// $ANTLR 3.1.2 C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g 2009-08-08 10:45:53

// The variable 'variable' is assigned but its value is never used.
#pragma warning disable 168, 219
// Unreachable code detected.
#pragma warning disable 162

//Parser Header	
using SscLib;


using System;
using Antlr.Runtime;
using IList 		= System.Collections.IList;
using ArrayList 	= System.Collections.ArrayList;
using Stack 		= Antlr.Runtime.Collections.StackList;

using IDictionary	= System.Collections.IDictionary;
using Hashtable 	= System.Collections.Hashtable;


using Antlr.Runtime.Tree;

public partial class SimSharpParser : Parser
{
    public static readonly string[] tokenNames = new string[] 
	{
        "<invalid>", 
		"<EOR>", 
		"<DOWN>", 
		"<UP>", 
		"SimulaSourceModule", 
		"Program", 
		"Block", 
		"SubBlock", 
		"BlockHead", 
		"Declaration", 
		"VarDecl", 
		"Type", 
		"TypeList", 
		"ConstElement", 
		"Variable", 
		"LitteralNum", 
		"Statement", 
		"CompoundTail", 
		"CompoundStatement", 
		"ActualParameters", 
		"Source", 
		"Destination", 
		"RemoteAccess", 
		"MethOrArrayParams", 
		"Identifier", 
		"MethCall", 
		"ConnectBlock1", 
		"ConnectBlock2", 
		"ProcDecl", 
		"ProcBody", 
		"FormalParameters", 
		"Specification", 
		"ForRightPart", 
		"StepListElement", 
		"WhileListElement", 
		"Unary", 
		"ClassDecl", 
		"ClassBody", 
		"RemoteAssign", 
		"ArrayDecl", 
		"Array", 
		"ArrayDim", 
		"IdentList", 
		"Prolog", 
		"Epilog", 
		"AndThen", 
		"OrElse", 
		"Label", 
		"GoTo", 
		"LabelDesignator", 
		"SwitchDesignator", 
		"SwitchList", 
		"PrefixedBlock", 
		"PLUS", 
		"MINUS", 
		"TIMES", 
		"DIV", 
		"INTDIV", 
		"EXP", 
		"CONCAT", 
		"LONGEXP", 
		"REFEQ", 
		"REFNEQ", 
		"SCOLON", 
		"COLON", 
		"LPAR", 
		"RPAR", 
		"DOT", 
		"COMMA", 
		"VALASSIGN", 
		"REFASSIGN", 
		"EXTERNAL", 
		"PROCEDURE", 
		"ID", 
		"IS", 
		"CLASS", 
		"EQ", 
		"STRING", 
		"ACTIVATE", 
		"REACTIVATE", 
		"BEFORE", 
		"AFTER", 
		"PRIOR", 
		"AT", 
		"DELAY", 
		"ELSE", 
		"IF", 
		"THEN", 
		"WHILE", 
		"DO", 
		"FOR", 
		"STEP", 
		"UNTIL", 
		"GOTO", 
		"GO", 
		"TO", 
		"INSPECT", 
		"WHEN", 
		"OTHERWISE", 
		"BEGIN", 
		"END", 
		"ARRAY", 
		"SWITCH", 
		"LABEL", 
		"NAME", 
		"VALUE", 
		"INNER", 
		"VIRTUAL", 
		"HIDDEN", 
		"PROTECTED", 
		"OR", 
		"AND", 
		"EQV", 
		"IMP", 
		"NOT", 
		"IN", 
		"LT", 
		"LE", 
		"GE", 
		"GT", 
		"NE", 
		"QUA", 
		"NONE", 
		"NUM_INT", 
		"NUM_REAL", 
		"NOTEXT", 
		"CHARCONST", 
		"NEW", 
		"THIS", 
		"BOOLEAN", 
		"CHARACTER", 
		"INTEGER", 
		"SHORT", 
		"REAL", 
		"LONG", 
		"TEXT", 
		"REF", 
		"TRUE", 
		"FALSE", 
		"A", 
		"C", 
		"T", 
		"I", 
		"V", 
		"E", 
		"F", 
		"R", 
		"N", 
		"D", 
		"Y", 
		"B", 
		"O", 
		"G", 
		"L", 
		"H", 
		"S", 
		"M", 
		"COMMENT", 
		"Q", 
		"X", 
		"P", 
		"W", 
		"U", 
		"LETTER", 
		"DIGIT", 
		"RADIX", 
		"RADIXDIGIT", 
		"DECIMALNUMBER", 
		"EXPONENTPART", 
		"CHAR", 
		"COMM", 
		"WHITESPACE", 
		"DECIMALFRAC", 
		"J", 
		"K", 
		"Z"
    };

    public const int ProcBody = 29;
    public const int EXTERNAL = 71;
    public const int LT = 116;
    public const int WHILE = 88;
    public const int Array = 40;
    public const int Specification = 31;
    public const int LETTER = 163;
    public const int CHAR = 169;
    public const int NEW = 127;
    public const int DO = 89;
    public const int WhileListElement = 34;
    public const int NOT = 114;
    public const int ClassBody = 37;
    public const int EOF = -1;
    public const int CHARACTER = 130;
    public const int Identifier = 24;
    public const int NAME = 104;
    public const int Variable = 14;
    public const int LPAR = 65;
    public const int EXP = 58;
    public const int Declaration = 9;
    public const int NUM_REAL = 124;
    public const int MethCall = 25;
    public const int BEGIN = 99;
    public const int Unary = 35;
    public const int THIS = 128;
    public const int IMP = 113;
    public const int RADIX = 165;
    public const int GOTO = 93;
    public const int EQ = 76;
    public const int COMMENT = 157;
    public const int ForRightPart = 32;
    public const int VIRTUAL = 107;
    public const int ARRAY = 101;
    public const int REFNEQ = 62;
    public const int OTHERWISE = 98;
    public const int NE = 120;
    public const int D = 148;
    public const int E = 144;
    public const int F = 145;
    public const int GE = 118;
    public const int G = 152;
    public const int A = 139;
    public const int B = 150;
    public const int C = 140;
    public const int L = 153;
    public const int CONCAT = 59;
    public const int M = 156;
    public const int StepListElement = 33;
    public const int N = 147;
    public const int O = 151;
    public const int H = 154;
    public const int SWITCH = 102;
    public const int I = 142;
    public const int J = 173;
    public const int ELSE = 85;
    public const int K = 174;
    public const int U = 162;
    public const int T = 141;
    public const int WHITESPACE = 171;
    public const int W = 161;
    public const int V = 143;
    public const int QUA = 121;
    public const int Q = 158;
    public const int P = 160;
    public const int S = 155;
    public const int R = 146;
    public const int VALUE = 105;
    public const int Y = 149;
    public const int MethOrArrayParams = 23;
    public const int X = 159;
    public const int Block = 6;
    public const int Z = 175;
    public const int REAL = 133;
    public const int GoTo = 48;
    public const int BlockHead = 8;
    public const int REACTIVATE = 79;
    public const int UNTIL = 92;
    public const int DECIMALFRAC = 172;
    public const int INSPECT = 96;
    public const int NONE = 122;
    public const int NUM_INT = 123;
    public const int OR = 110;
    public const int GT = 119;
    public const int VALASSIGN = 69;
    public const int GO = 94;
    public const int END = 100;
    public const int FALSE = 138;
    public const int ConstElement = 13;
    public const int SubBlock = 7;
    public const int Label = 47;
    public const int NOTEXT = 125;
    public const int RADIXDIGIT = 166;
    public const int Destination = 21;
    public const int SwitchDesignator = 50;
    public const int DELAY = 84;
    public const int PROTECTED = 109;
    public const int CLASS = 75;
    public const int INNER = 106;
    public const int Epilog = 44;
    public const int INTDIV = 57;
    public const int PrefixedBlock = 52;
    public const int ProcDecl = 28;
    public const int SimulaSourceModule = 4;
    public const int FOR = 90;
    public const int STEP = 91;
    public const int LitteralNum = 15;
    public const int VarDecl = 10;
    public const int AND = 111;
    public const int ID = 73;
    public const int Program = 5;
    public const int AndThen = 45;
    public const int ActualParameters = 19;
    public const int IF = 86;
    public const int TypeList = 12;
    public const int ConnectBlock1 = 26;
    public const int AT = 83;
    public const int ConnectBlock2 = 27;
    public const int BOOLEAN = 129;
    public const int IN = 115;
    public const int THEN = 87;
    public const int RemoteAssign = 38;
    public const int COMMA = 68;
    public const int IS = 74;
    public const int CompoundTail = 17;
    public const int ArrayDim = 41;
    public const int CompoundStatement = 18;
    public const int Source = 20;
    public const int PLUS = 53;
    public const int REFEQ = 61;
    public const int DIGIT = 164;
    public const int SwitchList = 51;
    public const int Prolog = 43;
    public const int DOT = 67;
    public const int FormalParameters = 30;
    public const int IdentList = 42;
    public const int SCOLON = 63;
    public const int INTEGER = 131;
    public const int ArrayDecl = 39;
    public const int Type = 11;
    public const int Statement = 16;
    public const int TO = 95;
    public const int LabelDesignator = 49;
    public const int ACTIVATE = 78;
    public const int ClassDecl = 36;
    public const int SHORT = 132;
    public const int BEFORE = 80;
    public const int LONGEXP = 60;
    public const int COMM = 170;
    public const int TEXT = 135;
    public const int MINUS = 54;
    public const int AFTER = 81;
    public const int OrElse = 46;
    public const int TRUE = 137;
    public const int PROCEDURE = 72;
    public const int REF = 136;
    public const int REFASSIGN = 70;
    public const int COLON = 64;
    public const int EXPONENTPART = 168;
    public const int DECIMALNUMBER = 167;
    public const int LABEL = 103;
    public const int WHEN = 97;
    public const int HIDDEN = 108;
    public const int RemoteAccess = 22;
    public const int EQV = 112;
    public const int RPAR = 66;
    public const int DIV = 56;
    public const int TIMES = 55;
    public const int LONG = 134;
    public const int LE = 117;
    public const int CHARCONST = 126;
    public const int STRING = 77;
    public const int PRIOR = 82;

    // delegates
    // delegators



        public SimSharpParser(ITokenStream input)
    		: this(input, new RecognizerSharedState()) {
        }

        public SimSharpParser(ITokenStream input, RecognizerSharedState state)
    		: base(input, state) {
            InitializeCyclicDFAs();

             
        }
        
    protected ITreeAdaptor adaptor = new CommonTreeAdaptor();

    public ITreeAdaptor TreeAdaptor
    {
        get { return this.adaptor; }
        set {
    	this.adaptor = value;
    	}
    }

    override public string[] TokenNames {
		get { return SimSharpParser.tokenNames; }
    }

    override public string GrammarFileName {
		get { return "C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g"; }
    }


        public SscLib.IErrorManager errMan;
        private bool assignment = false;
        SymbolTable symTab;
        Context ctx = new Context();
        
        public override void DisplayRecognitionError(string[] tokenNames, RecognitionException e)
        {
            string header = base.GetErrorHeader(e);
            string message = base.GetErrorMessage(e, tokenNames);
            errMan.ReportError("Syntax", header, message, tokenNames, e);
        }


    public class begin_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "begin"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:120:1: begin[SymbolTable st] : simulaSourceModule ;
    public SimSharpParser.begin_return begin(SymbolTable st) // throws RecognitionException [1]
    {   
        SimSharpParser.begin_return retval = new SimSharpParser.begin_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        SimSharpParser.simulaSourceModule_return simulaSourceModule1 = default(SimSharpParser.simulaSourceModule_return);




        this.symTab = st;
        this.ctx.Push(st.TopScope);

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:125:2: ( simulaSourceModule )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:125:4: simulaSourceModule
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	PushFollow(FOLLOW_simulaSourceModule_in_begin637);
            	simulaSourceModule1 = simulaSourceModule();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, simulaSourceModule1.Tree);

            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "begin"

    public class simulaSourceModule_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "simulaSourceModule"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:130:1: simulaSourceModule : ( externalHead )? ( program | procedureDeclaration | ( ( ID )? CLASS )=> classDeclaration ) -> ^( SimulaSourceModule ( externalHead )? ( program )? ( procedureDeclaration )? ( classDeclaration )? ) ;
    public SimSharpParser.simulaSourceModule_return simulaSourceModule() // throws RecognitionException [1]
    {   
        SimSharpParser.simulaSourceModule_return retval = new SimSharpParser.simulaSourceModule_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        SimSharpParser.externalHead_return externalHead2 = default(SimSharpParser.externalHead_return);

        SimSharpParser.program_return program3 = default(SimSharpParser.program_return);

        SimSharpParser.procedureDeclaration_return procedureDeclaration4 = default(SimSharpParser.procedureDeclaration_return);

        SimSharpParser.classDeclaration_return classDeclaration5 = default(SimSharpParser.classDeclaration_return);


        RewriteRuleSubtreeStream stream_procedureDeclaration = new RewriteRuleSubtreeStream(adaptor,"rule procedureDeclaration");
        RewriteRuleSubtreeStream stream_program = new RewriteRuleSubtreeStream(adaptor,"rule program");
        RewriteRuleSubtreeStream stream_classDeclaration = new RewriteRuleSubtreeStream(adaptor,"rule classDeclaration");
        RewriteRuleSubtreeStream stream_externalHead = new RewriteRuleSubtreeStream(adaptor,"rule externalHead");
        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:135:2: ( ( externalHead )? ( program | procedureDeclaration | ( ( ID )? CLASS )=> classDeclaration ) -> ^( SimulaSourceModule ( externalHead )? ( program )? ( procedureDeclaration )? ( classDeclaration )? ) )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:136:3: ( externalHead )? ( program | procedureDeclaration | ( ( ID )? CLASS )=> classDeclaration )
            {
            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:136:3: ( externalHead )?
            	int alt1 = 2;
            	alt1 = dfa1.Predict(input);
            	switch (alt1) 
            	{
            	    case 1 :
            	        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:136:4: externalHead
            	        {
            	        	PushFollow(FOLLOW_externalHead_in_simulaSourceModule660);
            	        	externalHead2 = externalHead();
            	        	state.followingStackPointer--;
            	        	if (state.failed) return retval;
            	        	if ( (state.backtracking==0) ) stream_externalHead.Add(externalHead2.Tree);

            	        }
            	        break;

            	}

            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:137:4: ( program | procedureDeclaration | ( ( ID )? CLASS )=> classDeclaration )
            	int alt2 = 3;
            	alt2 = dfa2.Predict(input);
            	switch (alt2) 
            	{
            	    case 1 :
            	        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:137:5: program
            	        {
            	        	PushFollow(FOLLOW_program_in_simulaSourceModule668);
            	        	program3 = program();
            	        	state.followingStackPointer--;
            	        	if (state.failed) return retval;
            	        	if ( (state.backtracking==0) ) stream_program.Add(program3.Tree);

            	        }
            	        break;
            	    case 2 :
            	        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:137:15: procedureDeclaration
            	        {
            	        	PushFollow(FOLLOW_procedureDeclaration_in_simulaSourceModule672);
            	        	procedureDeclaration4 = procedureDeclaration();
            	        	state.followingStackPointer--;
            	        	if (state.failed) return retval;
            	        	if ( (state.backtracking==0) ) stream_procedureDeclaration.Add(procedureDeclaration4.Tree);

            	        }
            	        break;
            	    case 3 :
            	        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:137:38: ( ( ID )? CLASS )=> classDeclaration
            	        {
            	        	PushFollow(FOLLOW_classDeclaration_in_simulaSourceModule687);
            	        	classDeclaration5 = classDeclaration();
            	        	state.followingStackPointer--;
            	        	if (state.failed) return retval;
            	        	if ( (state.backtracking==0) ) stream_classDeclaration.Add(classDeclaration5.Tree);

            	        }
            	        break;

            	}



            	// AST REWRITE
            	// elements:          procedureDeclaration, program, classDeclaration, externalHead
            	// token labels:      
            	// rule labels:       retval
            	// token list labels: 
            	// rule list labels:  
            	// wildcard labels: 
            	if ( (state.backtracking==0) ) {
            	retval.Tree = root_0;
            	RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval!=null ? retval.Tree : null);

            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();
            	// 137:73: -> ^( SimulaSourceModule ( externalHead )? ( program )? ( procedureDeclaration )? ( classDeclaration )? )
            	{
            	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:137:76: ^( SimulaSourceModule ( externalHead )? ( program )? ( procedureDeclaration )? ( classDeclaration )? )
            	    {
            	    SimSharpTreeNode root_1 = (SimSharpTreeNode)adaptor.GetNilNode();
            	    root_1 = (SimSharpTreeNode)adaptor.BecomeRoot((SimSharpTreeNode)adaptor.Create(SimulaSourceModule, "SimulaSourceModule"), root_1);

            	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:137:97: ( externalHead )?
            	    if ( stream_externalHead.HasNext() )
            	    {
            	        adaptor.AddChild(root_1, stream_externalHead.NextTree());

            	    }
            	    stream_externalHead.Reset();
            	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:137:111: ( program )?
            	    if ( stream_program.HasNext() )
            	    {
            	        adaptor.AddChild(root_1, stream_program.NextTree());

            	    }
            	    stream_program.Reset();
            	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:137:120: ( procedureDeclaration )?
            	    if ( stream_procedureDeclaration.HasNext() )
            	    {
            	        adaptor.AddChild(root_1, stream_procedureDeclaration.NextTree());

            	    }
            	    stream_procedureDeclaration.Reset();
            	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:137:142: ( classDeclaration )?
            	    if ( stream_classDeclaration.HasNext() )
            	    {
            	        adaptor.AddChild(root_1, stream_classDeclaration.NextTree());

            	    }
            	    stream_classDeclaration.Reset();

            	    adaptor.AddChild(root_0, root_1);
            	    }

            	}

            	retval.Tree = root_0;retval.Tree = root_0;}
            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "simulaSourceModule"

    public class externalHead_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "externalHead"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:140:1: externalHead : externalDeclaration SCOLON ( externalDeclaration SCOLON )* ;
    public SimSharpParser.externalHead_return externalHead() // throws RecognitionException [1]
    {   
        SimSharpParser.externalHead_return retval = new SimSharpParser.externalHead_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken SCOLON7 = null;
        IToken SCOLON9 = null;
        SimSharpParser.externalDeclaration_return externalDeclaration6 = default(SimSharpParser.externalDeclaration_return);

        SimSharpParser.externalDeclaration_return externalDeclaration8 = default(SimSharpParser.externalDeclaration_return);


        SimSharpTreeNode SCOLON7_tree=null;
        SimSharpTreeNode SCOLON9_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:141:2: ( externalDeclaration SCOLON ( externalDeclaration SCOLON )* )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:141:4: externalDeclaration SCOLON ( externalDeclaration SCOLON )*
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	PushFollow(FOLLOW_externalDeclaration_in_externalHead717);
            	externalDeclaration6 = externalDeclaration();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, externalDeclaration6.Tree);
            	SCOLON7=(IToken)Match(input,SCOLON,FOLLOW_SCOLON_in_externalHead719); if (state.failed) return retval;
            	if ( state.backtracking == 0 )
            	{SCOLON7_tree = (SimSharpTreeNode)adaptor.Create(SCOLON7);
            		adaptor.AddChild(root_0, SCOLON7_tree);
            	}
            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:141:31: ( externalDeclaration SCOLON )*
            	do 
            	{
            	    int alt3 = 2;
            	    alt3 = dfa3.Predict(input);
            	    switch (alt3) 
            		{
            			case 1 :
            			    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:141:32: externalDeclaration SCOLON
            			    {
            			    	PushFollow(FOLLOW_externalDeclaration_in_externalHead722);
            			    	externalDeclaration8 = externalDeclaration();
            			    	state.followingStackPointer--;
            			    	if (state.failed) return retval;
            			    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, externalDeclaration8.Tree);
            			    	SCOLON9=(IToken)Match(input,SCOLON,FOLLOW_SCOLON_in_externalHead724); if (state.failed) return retval;
            			    	if ( state.backtracking == 0 )
            			    	{SCOLON9_tree = (SimSharpTreeNode)adaptor.Create(SCOLON9);
            			    		adaptor.AddChild(root_0, SCOLON9_tree);
            			    	}

            			    }
            			    break;

            			default:
            			    goto loop3;
            	    }
            	} while (true);

            	loop3:
            		;	// Stops C# compiler whining that label 'loop3' has no statements


            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "externalHead"

    public class externalDeclaration_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "externalDeclaration"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:144:1: externalDeclaration : ( externalProcedureDeclaration | ( EXTERNAL CLASS )=> externalClassDeclaration );
    public SimSharpParser.externalDeclaration_return externalDeclaration() // throws RecognitionException [1]
    {   
        SimSharpParser.externalDeclaration_return retval = new SimSharpParser.externalDeclaration_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        SimSharpParser.externalProcedureDeclaration_return externalProcedureDeclaration10 = default(SimSharpParser.externalProcedureDeclaration_return);

        SimSharpParser.externalClassDeclaration_return externalClassDeclaration11 = default(SimSharpParser.externalClassDeclaration_return);



        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:146:2: ( externalProcedureDeclaration | ( EXTERNAL CLASS )=> externalClassDeclaration )
            int alt4 = 2;
            int LA4_0 = input.LA(1);

            if ( (LA4_0 == EXTERNAL) )
            {
                int LA4_1 = input.LA(2);

                if ( (true) )
                {
                    alt4 = 1;
                }
                else if ( (synpred2_SimSharp()) )
                {
                    alt4 = 2;
                }
                else 
                {
                    if ( state.backtracking > 0 ) {state.failed = true; return retval;}
                    NoViableAltException nvae_d4s1 =
                        new NoViableAltException("", 4, 1, input);

                    throw nvae_d4s1;
                }
            }
            else 
            {
                if ( state.backtracking > 0 ) {state.failed = true; return retval;}
                NoViableAltException nvae_d4s0 =
                    new NoViableAltException("", 4, 0, input);

                throw nvae_d4s0;
            }
            switch (alt4) 
            {
                case 1 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:146:5: externalProcedureDeclaration
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	PushFollow(FOLLOW_externalProcedureDeclaration_in_externalDeclaration739);
                    	externalProcedureDeclaration10 = externalProcedureDeclaration();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, externalProcedureDeclaration10.Tree);

                    }
                    break;
                case 2 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:147:12: ( EXTERNAL CLASS )=> externalClassDeclaration
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	PushFollow(FOLLOW_externalClassDeclaration_in_externalDeclaration760);
                    	externalClassDeclaration11 = externalClassDeclaration();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, externalClassDeclaration11.Tree);

                    }
                    break;

            }
            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "externalDeclaration"

    public class program_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "program"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:150:1: program : block -> ^( Program block ) ;
    public SimSharpParser.program_return program() // throws RecognitionException [1]
    {   
        SimSharpParser.program_return retval = new SimSharpParser.program_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        SimSharpParser.block_return block12 = default(SimSharpParser.block_return);


        RewriteRuleSubtreeStream stream_block = new RewriteRuleSubtreeStream(adaptor,"rule block");
        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:150:9: ( block -> ^( Program block ) )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:150:11: block
            {
            	if ( (state.backtracking==0) )
            	{

            	  	    ProgramSymbol prog = ctx.Scope.AddProgram("Program", SymbolTable.SimProg); 
            	  	    ctx.Push(prog);
            	  	  
            	}
            	PushFollow(FOLLOW_block_in_program776);
            	block12 = block();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( (state.backtracking==0) ) stream_block.Add(block12.Tree);
            	if ( (state.backtracking==0) )
            	{

            	  	    ctx.Pop();
            	  	  
            	}


            	// AST REWRITE
            	// elements:          block
            	// token labels:      
            	// rule labels:       retval
            	// token list labels: 
            	// rule list labels:  
            	// wildcard labels: 
            	if ( (state.backtracking==0) ) {
            	retval.Tree = root_0;
            	RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval!=null ? retval.Tree : null);

            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();
            	// 159:4: -> ^( Program block )
            	{
            	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:159:7: ^( Program block )
            	    {
            	    SimSharpTreeNode root_1 = (SimSharpTreeNode)adaptor.GetNilNode();
            	    root_1 = (SimSharpTreeNode)adaptor.BecomeRoot((SimSharpTreeNode)adaptor.Create(Program, "Program"), root_1);

            	    adaptor.AddChild(root_1, stream_block.NextTree());

            	    adaptor.AddChild(root_0, root_1);
            	    }

            	}

            	retval.Tree = root_0;retval.Tree = root_0;}
            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "program"

    public class externalProcedureDeclaration_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "externalProcedureDeclaration"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:163:1: externalProcedureDeclaration options {k=7; } : ( EXTERNAL ( kind )? ( type )? PROCEDURE externalList | EXTERNAL kind PROCEDURE externalItem procedureSpecification );
    public SimSharpParser.externalProcedureDeclaration_return externalProcedureDeclaration() // throws RecognitionException [1]
    {   
        SimSharpParser.externalProcedureDeclaration_return retval = new SimSharpParser.externalProcedureDeclaration_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken EXTERNAL13 = null;
        IToken PROCEDURE16 = null;
        IToken EXTERNAL18 = null;
        IToken PROCEDURE20 = null;
        SimSharpParser.kind_return kind14 = default(SimSharpParser.kind_return);

        SimSharpParser.type_return type15 = default(SimSharpParser.type_return);

        SimSharpParser.externalList_return externalList17 = default(SimSharpParser.externalList_return);

        SimSharpParser.kind_return kind19 = default(SimSharpParser.kind_return);

        SimSharpParser.externalItem_return externalItem21 = default(SimSharpParser.externalItem_return);

        SimSharpParser.procedureSpecification_return procedureSpecification22 = default(SimSharpParser.procedureSpecification_return);


        SimSharpTreeNode EXTERNAL13_tree=null;
        SimSharpTreeNode PROCEDURE16_tree=null;
        SimSharpTreeNode EXTERNAL18_tree=null;
        SimSharpTreeNode PROCEDURE20_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:165:2: ( EXTERNAL ( kind )? ( type )? PROCEDURE externalList | EXTERNAL kind PROCEDURE externalItem procedureSpecification )
            int alt7 = 2;
            alt7 = dfa7.Predict(input);
            switch (alt7) 
            {
                case 1 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:165:4: EXTERNAL ( kind )? ( type )? PROCEDURE externalList
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	EXTERNAL13=(IToken)Match(input,EXTERNAL,FOLLOW_EXTERNAL_in_externalProcedureDeclaration824); if (state.failed) return retval;
                    	if ( state.backtracking == 0 )
                    	{EXTERNAL13_tree = (SimSharpTreeNode)adaptor.Create(EXTERNAL13);
                    		adaptor.AddChild(root_0, EXTERNAL13_tree);
                    	}
                    	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:165:13: ( kind )?
                    	int alt5 = 2;
                    	int LA5_0 = input.LA(1);

                    	if ( (LA5_0 == ID) )
                    	{
                    	    alt5 = 1;
                    	}
                    	switch (alt5) 
                    	{
                    	    case 1 :
                    	        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:165:14: kind
                    	        {
                    	        	PushFollow(FOLLOW_kind_in_externalProcedureDeclaration827);
                    	        	kind14 = kind();
                    	        	state.followingStackPointer--;
                    	        	if (state.failed) return retval;
                    	        	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, kind14.Tree);

                    	        }
                    	        break;

                    	}

                    	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:165:21: ( type )?
                    	int alt6 = 2;
                    	int LA6_0 = input.LA(1);

                    	if ( ((LA6_0 >= BOOLEAN && LA6_0 <= REF)) )
                    	{
                    	    alt6 = 1;
                    	}
                    	switch (alt6) 
                    	{
                    	    case 1 :
                    	        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:165:22: type
                    	        {
                    	        	PushFollow(FOLLOW_type_in_externalProcedureDeclaration832);
                    	        	type15 = type();
                    	        	state.followingStackPointer--;
                    	        	if (state.failed) return retval;
                    	        	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, type15.Tree);

                    	        }
                    	        break;

                    	}

                    	PROCEDURE16=(IToken)Match(input,PROCEDURE,FOLLOW_PROCEDURE_in_externalProcedureDeclaration836); if (state.failed) return retval;
                    	if ( state.backtracking == 0 )
                    	{PROCEDURE16_tree = (SimSharpTreeNode)adaptor.Create(PROCEDURE16);
                    		adaptor.AddChild(root_0, PROCEDURE16_tree);
                    	}
                    	PushFollow(FOLLOW_externalList_in_externalProcedureDeclaration838);
                    	externalList17 = externalList();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, externalList17.Tree);

                    }
                    break;
                case 2 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:166:11: EXTERNAL kind PROCEDURE externalItem procedureSpecification
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	EXTERNAL18=(IToken)Match(input,EXTERNAL,FOLLOW_EXTERNAL_in_externalProcedureDeclaration850); if (state.failed) return retval;
                    	if ( state.backtracking == 0 )
                    	{EXTERNAL18_tree = (SimSharpTreeNode)adaptor.Create(EXTERNAL18);
                    		adaptor.AddChild(root_0, EXTERNAL18_tree);
                    	}
                    	PushFollow(FOLLOW_kind_in_externalProcedureDeclaration852);
                    	kind19 = kind();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, kind19.Tree);
                    	PROCEDURE20=(IToken)Match(input,PROCEDURE,FOLLOW_PROCEDURE_in_externalProcedureDeclaration854); if (state.failed) return retval;
                    	if ( state.backtracking == 0 )
                    	{PROCEDURE20_tree = (SimSharpTreeNode)adaptor.Create(PROCEDURE20);
                    		adaptor.AddChild(root_0, PROCEDURE20_tree);
                    	}
                    	PushFollow(FOLLOW_externalItem_in_externalProcedureDeclaration856);
                    	externalItem21 = externalItem();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, externalItem21.Tree);
                    	PushFollow(FOLLOW_procedureSpecification_in_externalProcedureDeclaration858);
                    	procedureSpecification22 = procedureSpecification();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, procedureSpecification22.Tree);

                    }
                    break;

            }
            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "externalProcedureDeclaration"

    public class kind_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "kind"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:169:1: kind : ID ;
    public SimSharpParser.kind_return kind() // throws RecognitionException [1]
    {   
        SimSharpParser.kind_return retval = new SimSharpParser.kind_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken ID23 = null;

        SimSharpTreeNode ID23_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:169:6: ( ID )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:169:8: ID
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	ID23=(IToken)Match(input,ID,FOLLOW_ID_in_kind868); if (state.failed) return retval;
            	if ( state.backtracking == 0 )
            	{ID23_tree = (SimSharpTreeNode)adaptor.Create(ID23);
            		adaptor.AddChild(root_0, ID23_tree);
            	}

            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "kind"

    public class procedureSpecification_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "procedureSpecification"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:172:1: procedureSpecification : IS procedureDeclaration ;
    public SimSharpParser.procedureSpecification_return procedureSpecification() // throws RecognitionException [1]
    {   
        SimSharpParser.procedureSpecification_return retval = new SimSharpParser.procedureSpecification_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken IS24 = null;
        SimSharpParser.procedureDeclaration_return procedureDeclaration25 = default(SimSharpParser.procedureDeclaration_return);


        SimSharpTreeNode IS24_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:173:2: ( IS procedureDeclaration )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:173:4: IS procedureDeclaration
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	IS24=(IToken)Match(input,IS,FOLLOW_IS_in_procedureSpecification879); if (state.failed) return retval;
            	if ( state.backtracking == 0 )
            	{IS24_tree = (SimSharpTreeNode)adaptor.Create(IS24);
            		adaptor.AddChild(root_0, IS24_tree);
            	}
            	PushFollow(FOLLOW_procedureDeclaration_in_procedureSpecification881);
            	procedureDeclaration25 = procedureDeclaration();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, procedureDeclaration25.Tree);

            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "procedureSpecification"

    public class externalClassDeclaration_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "externalClassDeclaration"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:176:1: externalClassDeclaration : EXTERNAL CLASS externalList ;
    public SimSharpParser.externalClassDeclaration_return externalClassDeclaration() // throws RecognitionException [1]
    {   
        SimSharpParser.externalClassDeclaration_return retval = new SimSharpParser.externalClassDeclaration_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken EXTERNAL26 = null;
        IToken CLASS27 = null;
        SimSharpParser.externalList_return externalList28 = default(SimSharpParser.externalList_return);


        SimSharpTreeNode EXTERNAL26_tree=null;
        SimSharpTreeNode CLASS27_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:177:2: ( EXTERNAL CLASS externalList )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:177:4: EXTERNAL CLASS externalList
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	EXTERNAL26=(IToken)Match(input,EXTERNAL,FOLLOW_EXTERNAL_in_externalClassDeclaration892); if (state.failed) return retval;
            	if ( state.backtracking == 0 )
            	{EXTERNAL26_tree = (SimSharpTreeNode)adaptor.Create(EXTERNAL26);
            		adaptor.AddChild(root_0, EXTERNAL26_tree);
            	}
            	CLASS27=(IToken)Match(input,CLASS,FOLLOW_CLASS_in_externalClassDeclaration894); if (state.failed) return retval;
            	if ( state.backtracking == 0 )
            	{CLASS27_tree = (SimSharpTreeNode)adaptor.Create(CLASS27);
            		adaptor.AddChild(root_0, CLASS27_tree);
            	}
            	PushFollow(FOLLOW_externalList_in_externalClassDeclaration896);
            	externalList28 = externalList();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, externalList28.Tree);

            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "externalClassDeclaration"

    public class externalList_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "externalList"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:180:1: externalList : externalItem ( COMMA externalItem )* ;
    public SimSharpParser.externalList_return externalList() // throws RecognitionException [1]
    {   
        SimSharpParser.externalList_return retval = new SimSharpParser.externalList_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken COMMA30 = null;
        SimSharpParser.externalItem_return externalItem29 = default(SimSharpParser.externalItem_return);

        SimSharpParser.externalItem_return externalItem31 = default(SimSharpParser.externalItem_return);


        SimSharpTreeNode COMMA30_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:181:2: ( externalItem ( COMMA externalItem )* )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:181:4: externalItem ( COMMA externalItem )*
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	PushFollow(FOLLOW_externalItem_in_externalList907);
            	externalItem29 = externalItem();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, externalItem29.Tree);
            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:181:17: ( COMMA externalItem )*
            	do 
            	{
            	    int alt8 = 2;
            	    int LA8_0 = input.LA(1);

            	    if ( (LA8_0 == COMMA) )
            	    {
            	        alt8 = 1;
            	    }


            	    switch (alt8) 
            		{
            			case 1 :
            			    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:181:19: COMMA externalItem
            			    {
            			    	COMMA30=(IToken)Match(input,COMMA,FOLLOW_COMMA_in_externalList911); if (state.failed) return retval;
            			    	if ( state.backtracking == 0 )
            			    	{COMMA30_tree = (SimSharpTreeNode)adaptor.Create(COMMA30);
            			    		adaptor.AddChild(root_0, COMMA30_tree);
            			    	}
            			    	PushFollow(FOLLOW_externalItem_in_externalList913);
            			    	externalItem31 = externalItem();
            			    	state.followingStackPointer--;
            			    	if (state.failed) return retval;
            			    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, externalItem31.Tree);

            			    }
            			    break;

            			default:
            			    goto loop8;
            	    }
            	} while (true);

            	loop8:
            		;	// Stops C# compiler whining that label 'loop8' has no statements


            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "externalList"

    public class externalItem_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "externalItem"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:184:1: externalItem : ID ( EQ externalIdentification )? ;
    public SimSharpParser.externalItem_return externalItem() // throws RecognitionException [1]
    {   
        SimSharpParser.externalItem_return retval = new SimSharpParser.externalItem_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken ID32 = null;
        IToken EQ33 = null;
        SimSharpParser.externalIdentification_return externalIdentification34 = default(SimSharpParser.externalIdentification_return);


        SimSharpTreeNode ID32_tree=null;
        SimSharpTreeNode EQ33_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:185:2: ( ID ( EQ externalIdentification )? )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:185:4: ID ( EQ externalIdentification )?
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	ID32=(IToken)Match(input,ID,FOLLOW_ID_in_externalItem927); if (state.failed) return retval;
            	if ( state.backtracking == 0 )
            	{ID32_tree = (SimSharpTreeNode)adaptor.Create(ID32);
            		adaptor.AddChild(root_0, ID32_tree);
            	}
            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:185:7: ( EQ externalIdentification )?
            	int alt9 = 2;
            	int LA9_0 = input.LA(1);

            	if ( (LA9_0 == EQ) )
            	{
            	    alt9 = 1;
            	}
            	switch (alt9) 
            	{
            	    case 1 :
            	        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:185:9: EQ externalIdentification
            	        {
            	        	EQ33=(IToken)Match(input,EQ,FOLLOW_EQ_in_externalItem931); if (state.failed) return retval;
            	        	if ( state.backtracking == 0 )
            	        	{EQ33_tree = (SimSharpTreeNode)adaptor.Create(EQ33);
            	        		adaptor.AddChild(root_0, EQ33_tree);
            	        	}
            	        	PushFollow(FOLLOW_externalIdentification_in_externalItem933);
            	        	externalIdentification34 = externalIdentification();
            	        	state.followingStackPointer--;
            	        	if (state.failed) return retval;
            	        	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, externalIdentification34.Tree);

            	        }
            	        break;

            	}


            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "externalItem"

    public class externalIdentification_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "externalIdentification"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:188:1: externalIdentification : STRING ;
    public SimSharpParser.externalIdentification_return externalIdentification() // throws RecognitionException [1]
    {   
        SimSharpParser.externalIdentification_return retval = new SimSharpParser.externalIdentification_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken STRING35 = null;

        SimSharpTreeNode STRING35_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:189:2: ( STRING )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:189:4: STRING
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	STRING35=(IToken)Match(input,STRING,FOLLOW_STRING_in_externalIdentification947); if (state.failed) return retval;
            	if ( state.backtracking == 0 )
            	{STRING35_tree = (SimSharpTreeNode)adaptor.Create(STRING35);
            		adaptor.AddChild(root_0, STRING35_tree);
            	}

            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "externalIdentification"

    public class activationStatement_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "activationStatement"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:196:1: activationStatement : activationClause ( schedulingClause )? ;
    public SimSharpParser.activationStatement_return activationStatement() // throws RecognitionException [1]
    {   
        SimSharpParser.activationStatement_return retval = new SimSharpParser.activationStatement_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        SimSharpParser.activationClause_return activationClause36 = default(SimSharpParser.activationClause_return);

        SimSharpParser.schedulingClause_return schedulingClause37 = default(SimSharpParser.schedulingClause_return);



        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:197:2: ( activationClause ( schedulingClause )? )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:197:4: activationClause ( schedulingClause )?
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	PushFollow(FOLLOW_activationClause_in_activationStatement962);
            	activationClause36 = activationClause();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, activationClause36.Tree);
            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:197:21: ( schedulingClause )?
            	int alt10 = 2;
            	int LA10_0 = input.LA(1);

            	if ( ((LA10_0 >= BEFORE && LA10_0 <= AFTER) || (LA10_0 >= AT && LA10_0 <= DELAY)) )
            	{
            	    alt10 = 1;
            	}
            	switch (alt10) 
            	{
            	    case 1 :
            	        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:197:23: schedulingClause
            	        {
            	        	PushFollow(FOLLOW_schedulingClause_in_activationStatement966);
            	        	schedulingClause37 = schedulingClause();
            	        	state.followingStackPointer--;
            	        	if (state.failed) return retval;
            	        	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, schedulingClause37.Tree);

            	        }
            	        break;

            	}


            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "activationStatement"

    public class activationClause_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "activationClause"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:200:1: activationClause : activator objectExpression ;
    public SimSharpParser.activationClause_return activationClause() // throws RecognitionException [1]
    {   
        SimSharpParser.activationClause_return retval = new SimSharpParser.activationClause_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        SimSharpParser.activator_return activator38 = default(SimSharpParser.activator_return);

        SimSharpParser.objectExpression_return objectExpression39 = default(SimSharpParser.objectExpression_return);



        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:201:2: ( activator objectExpression )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:201:4: activator objectExpression
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	PushFollow(FOLLOW_activator_in_activationClause981);
            	activator38 = activator();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, activator38.Tree);
            	PushFollow(FOLLOW_objectExpression_in_activationClause983);
            	objectExpression39 = objectExpression();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, objectExpression39.Tree);

            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "activationClause"

    public class activator_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "activator"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:204:1: activator : ( ACTIVATE | REACTIVATE );
    public SimSharpParser.activator_return activator() // throws RecognitionException [1]
    {   
        SimSharpParser.activator_return retval = new SimSharpParser.activator_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken set40 = null;

        SimSharpTreeNode set40_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:205:2: ( ACTIVATE | REACTIVATE )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	set40 = (IToken)input.LT(1);
            	if ( (input.LA(1) >= ACTIVATE && input.LA(1) <= REACTIVATE) ) 
            	{
            	    input.Consume();
            	    if ( state.backtracking == 0 ) adaptor.AddChild(root_0, (SimSharpTreeNode)adaptor.Create(set40));
            	    state.errorRecovery = false;state.failed = false;
            	}
            	else 
            	{
            	    if ( state.backtracking > 0 ) {state.failed = true; return retval;}
            	    MismatchedSetException mse = new MismatchedSetException(null,input);
            	    throw mse;
            	}


            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "activator"

    public class schedulingClause_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "schedulingClause"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:209:1: schedulingClause : ( timingClause | ( BEFORE | AFTER ) objectExpression );
    public SimSharpParser.schedulingClause_return schedulingClause() // throws RecognitionException [1]
    {   
        SimSharpParser.schedulingClause_return retval = new SimSharpParser.schedulingClause_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken set42 = null;
        SimSharpParser.timingClause_return timingClause41 = default(SimSharpParser.timingClause_return);

        SimSharpParser.objectExpression_return objectExpression43 = default(SimSharpParser.objectExpression_return);


        SimSharpTreeNode set42_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:210:2: ( timingClause | ( BEFORE | AFTER ) objectExpression )
            int alt11 = 2;
            int LA11_0 = input.LA(1);

            if ( ((LA11_0 >= AT && LA11_0 <= DELAY)) )
            {
                alt11 = 1;
            }
            else if ( ((LA11_0 >= BEFORE && LA11_0 <= AFTER)) )
            {
                alt11 = 2;
            }
            else 
            {
                if ( state.backtracking > 0 ) {state.failed = true; return retval;}
                NoViableAltException nvae_d11s0 =
                    new NoViableAltException("", 11, 0, input);

                throw nvae_d11s0;
            }
            switch (alt11) 
            {
                case 1 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:210:4: timingClause
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	PushFollow(FOLLOW_timingClause_in_schedulingClause1011);
                    	timingClause41 = timingClause();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, timingClause41.Tree);

                    }
                    break;
                case 2 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:211:4: ( BEFORE | AFTER ) objectExpression
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	set42 = (IToken)input.LT(1);
                    	if ( (input.LA(1) >= BEFORE && input.LA(1) <= AFTER) ) 
                    	{
                    	    input.Consume();
                    	    if ( state.backtracking == 0 ) adaptor.AddChild(root_0, (SimSharpTreeNode)adaptor.Create(set42));
                    	    state.errorRecovery = false;state.failed = false;
                    	}
                    	else 
                    	{
                    	    if ( state.backtracking > 0 ) {state.failed = true; return retval;}
                    	    MismatchedSetException mse = new MismatchedSetException(null,input);
                    	    throw mse;
                    	}

                    	PushFollow(FOLLOW_objectExpression_in_schedulingClause1022);
                    	objectExpression43 = objectExpression();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, objectExpression43.Tree);

                    }
                    break;

            }
            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "schedulingClause"

    public class timingClause_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "timingClause"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:214:1: timingClause : simpleTimingClause ( PRIOR )? ;
    public SimSharpParser.timingClause_return timingClause() // throws RecognitionException [1]
    {   
        SimSharpParser.timingClause_return retval = new SimSharpParser.timingClause_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken PRIOR45 = null;
        SimSharpParser.simpleTimingClause_return simpleTimingClause44 = default(SimSharpParser.simpleTimingClause_return);


        SimSharpTreeNode PRIOR45_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:215:2: ( simpleTimingClause ( PRIOR )? )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:215:4: simpleTimingClause ( PRIOR )?
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	PushFollow(FOLLOW_simpleTimingClause_in_timingClause1033);
            	simpleTimingClause44 = simpleTimingClause();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, simpleTimingClause44.Tree);
            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:215:23: ( PRIOR )?
            	int alt12 = 2;
            	int LA12_0 = input.LA(1);

            	if ( (LA12_0 == PRIOR) )
            	{
            	    alt12 = 1;
            	}
            	switch (alt12) 
            	{
            	    case 1 :
            	        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:215:24: PRIOR
            	        {
            	        	PRIOR45=(IToken)Match(input,PRIOR,FOLLOW_PRIOR_in_timingClause1036); if (state.failed) return retval;
            	        	if ( state.backtracking == 0 )
            	        	{PRIOR45_tree = (SimSharpTreeNode)adaptor.Create(PRIOR45);
            	        		adaptor.AddChild(root_0, PRIOR45_tree);
            	        	}

            	        }
            	        break;

            	}


            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "timingClause"

    public class simpleTimingClause_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "simpleTimingClause"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:218:1: simpleTimingClause : ( AT | DELAY ) arithmeticExpression ;
    public SimSharpParser.simpleTimingClause_return simpleTimingClause() // throws RecognitionException [1]
    {   
        SimSharpParser.simpleTimingClause_return retval = new SimSharpParser.simpleTimingClause_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken set46 = null;
        SimSharpParser.arithmeticExpression_return arithmeticExpression47 = default(SimSharpParser.arithmeticExpression_return);


        SimSharpTreeNode set46_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:219:2: ( ( AT | DELAY ) arithmeticExpression )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:219:4: ( AT | DELAY ) arithmeticExpression
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	set46 = (IToken)input.LT(1);
            	if ( (input.LA(1) >= AT && input.LA(1) <= DELAY) ) 
            	{
            	    input.Consume();
            	    if ( state.backtracking == 0 ) adaptor.AddChild(root_0, (SimSharpTreeNode)adaptor.Create(set46));
            	    state.errorRecovery = false;state.failed = false;
            	}
            	else 
            	{
            	    if ( state.backtracking > 0 ) {state.failed = true; return retval;}
            	    MismatchedSetException mse = new MismatchedSetException(null,input);
            	    throw mse;
            	}

            	PushFollow(FOLLOW_arithmeticExpression_in_simpleTimingClause1056);
            	arithmeticExpression47 = arithmeticExpression();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, arithmeticExpression47.Tree);

            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "simpleTimingClause"

    public class programBody_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "programBody"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:227:1: programBody : block ;
    public SimSharpParser.programBody_return programBody() // throws RecognitionException [1]
    {   
        SimSharpParser.programBody_return retval = new SimSharpParser.programBody_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        SimSharpParser.block_return block48 = default(SimSharpParser.block_return);



        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:228:2: ( block )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:228:4: block
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	PushFollow(FOLLOW_block_in_programBody1072);
            	block48 = block();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, block48.Tree);

            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "programBody"

    public class statement_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "statement"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:231:1: statement : ( ( label COLON )=> label COLON )? ( unconditionalStatement | conditionalStatement | forStatement ) -> ( ^( Label label ) )? ( ^( unconditionalStatement ) )? ( ^( conditionalStatement ) )? ( ^( forStatement ) )? ;
    public SimSharpParser.statement_return statement() // throws RecognitionException [1]
    {   
        SimSharpParser.statement_return retval = new SimSharpParser.statement_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken COLON50 = null;
        SimSharpParser.label_return label49 = default(SimSharpParser.label_return);

        SimSharpParser.unconditionalStatement_return unconditionalStatement51 = default(SimSharpParser.unconditionalStatement_return);

        SimSharpParser.conditionalStatement_return conditionalStatement52 = default(SimSharpParser.conditionalStatement_return);

        SimSharpParser.forStatement_return forStatement53 = default(SimSharpParser.forStatement_return);


        SimSharpTreeNode COLON50_tree=null;
        RewriteRuleTokenStream stream_COLON = new RewriteRuleTokenStream(adaptor,"token COLON");
        RewriteRuleSubtreeStream stream_conditionalStatement = new RewriteRuleSubtreeStream(adaptor,"rule conditionalStatement");
        RewriteRuleSubtreeStream stream_forStatement = new RewriteRuleSubtreeStream(adaptor,"rule forStatement");
        RewriteRuleSubtreeStream stream_label = new RewriteRuleSubtreeStream(adaptor,"rule label");
        RewriteRuleSubtreeStream stream_unconditionalStatement = new RewriteRuleSubtreeStream(adaptor,"rule unconditionalStatement");
        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:232:2: ( ( ( label COLON )=> label COLON )? ( unconditionalStatement | conditionalStatement | forStatement ) -> ( ^( Label label ) )? ( ^( unconditionalStatement ) )? ( ^( conditionalStatement ) )? ( ^( forStatement ) )? )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:233:4: ( ( label COLON )=> label COLON )? ( unconditionalStatement | conditionalStatement | forStatement )
            {
            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:233:4: ( ( label COLON )=> label COLON )?
            	int alt13 = 2;
            	alt13 = dfa13.Predict(input);
            	switch (alt13) 
            	{
            	    case 1 :
            	        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:233:5: ( label COLON )=> label COLON
            	        {
            	        	PushFollow(FOLLOW_label_in_statement1095);
            	        	label49 = label();
            	        	state.followingStackPointer--;
            	        	if (state.failed) return retval;
            	        	if ( (state.backtracking==0) ) stream_label.Add(label49.Tree);
            	        	COLON50=(IToken)Match(input,COLON,FOLLOW_COLON_in_statement1097); if (state.failed) return retval; 
            	        	if ( (state.backtracking==0) ) stream_COLON.Add(COLON50);


            	        }
            	        break;

            	}

            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:234:3: ( unconditionalStatement | conditionalStatement | forStatement )
            	int alt14 = 3;
            	alt14 = dfa14.Predict(input);
            	switch (alt14) 
            	{
            	    case 1 :
            	        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:234:5: unconditionalStatement
            	        {
            	        	PushFollow(FOLLOW_unconditionalStatement_in_statement1105);
            	        	unconditionalStatement51 = unconditionalStatement();
            	        	state.followingStackPointer--;
            	        	if (state.failed) return retval;
            	        	if ( (state.backtracking==0) ) stream_unconditionalStatement.Add(unconditionalStatement51.Tree);

            	        }
            	        break;
            	    case 2 :
            	        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:234:30: conditionalStatement
            	        {
            	        	PushFollow(FOLLOW_conditionalStatement_in_statement1109);
            	        	conditionalStatement52 = conditionalStatement();
            	        	state.followingStackPointer--;
            	        	if (state.failed) return retval;
            	        	if ( (state.backtracking==0) ) stream_conditionalStatement.Add(conditionalStatement52.Tree);

            	        }
            	        break;
            	    case 3 :
            	        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:234:53: forStatement
            	        {
            	        	PushFollow(FOLLOW_forStatement_in_statement1113);
            	        	forStatement53 = forStatement();
            	        	state.followingStackPointer--;
            	        	if (state.failed) return retval;
            	        	if ( (state.backtracking==0) ) stream_forStatement.Add(forStatement53.Tree);

            	        }
            	        break;

            	}



            	// AST REWRITE
            	// elements:          unconditionalStatement, label, conditionalStatement, forStatement
            	// token labels:      
            	// rule labels:       retval
            	// token list labels: 
            	// rule list labels:  
            	// wildcard labels: 
            	if ( (state.backtracking==0) ) {
            	retval.Tree = root_0;
            	RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval!=null ? retval.Tree : null);

            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();
            	// 234:68: -> ( ^( Label label ) )? ( ^( unconditionalStatement ) )? ( ^( conditionalStatement ) )? ( ^( forStatement ) )?
            	{
            	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:234:71: ( ^( Label label ) )?
            	    if ( stream_label.HasNext() )
            	    {
            	        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:234:71: ^( Label label )
            	        {
            	        SimSharpTreeNode root_1 = (SimSharpTreeNode)adaptor.GetNilNode();
            	        root_1 = (SimSharpTreeNode)adaptor.BecomeRoot((SimSharpTreeNode)adaptor.Create(Label, "Label"), root_1);

            	        adaptor.AddChild(root_1, stream_label.NextTree());

            	        adaptor.AddChild(root_0, root_1);
            	        }

            	    }
            	    stream_label.Reset();
            	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:234:87: ( ^( unconditionalStatement ) )?
            	    if ( stream_unconditionalStatement.HasNext() )
            	    {
            	        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:234:87: ^( unconditionalStatement )
            	        {
            	        SimSharpTreeNode root_1 = (SimSharpTreeNode)adaptor.GetNilNode();
            	        root_1 = (SimSharpTreeNode)adaptor.BecomeRoot(stream_unconditionalStatement.NextNode(), root_1);

            	        adaptor.AddChild(root_0, root_1);
            	        }

            	    }
            	    stream_unconditionalStatement.Reset();
            	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:234:114: ( ^( conditionalStatement ) )?
            	    if ( stream_conditionalStatement.HasNext() )
            	    {
            	        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:234:114: ^( conditionalStatement )
            	        {
            	        SimSharpTreeNode root_1 = (SimSharpTreeNode)adaptor.GetNilNode();
            	        root_1 = (SimSharpTreeNode)adaptor.BecomeRoot(stream_conditionalStatement.NextNode(), root_1);

            	        adaptor.AddChild(root_0, root_1);
            	        }

            	    }
            	    stream_conditionalStatement.Reset();
            	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:234:139: ( ^( forStatement ) )?
            	    if ( stream_forStatement.HasNext() )
            	    {
            	        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:234:139: ^( forStatement )
            	        {
            	        SimSharpTreeNode root_1 = (SimSharpTreeNode)adaptor.GetNilNode();
            	        root_1 = (SimSharpTreeNode)adaptor.BecomeRoot(stream_forStatement.NextNode(), root_1);

            	        adaptor.AddChild(root_0, root_1);
            	        }

            	    }
            	    stream_forStatement.Reset();

            	}

            	retval.Tree = root_0;retval.Tree = root_0;}
            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "statement"

    public class unconditionalStatement_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "unconditionalStatement"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:237:1: unconditionalStatement : ( ( prefixedBlock )=> prefixedBlock | ( objectGenerator ( SCOLON | END ) )=> objectGenerator | ( assignmentStatement )=> assignmentStatement | procedureStatement | whileStatement | gotoStatement | connectionStatement | block | activationStatement | dummyStatement );
    public SimSharpParser.unconditionalStatement_return unconditionalStatement() // throws RecognitionException [1]
    {   
        SimSharpParser.unconditionalStatement_return retval = new SimSharpParser.unconditionalStatement_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        SimSharpParser.prefixedBlock_return prefixedBlock54 = default(SimSharpParser.prefixedBlock_return);

        SimSharpParser.objectGenerator_return objectGenerator55 = default(SimSharpParser.objectGenerator_return);

        SimSharpParser.assignmentStatement_return assignmentStatement56 = default(SimSharpParser.assignmentStatement_return);

        SimSharpParser.procedureStatement_return procedureStatement57 = default(SimSharpParser.procedureStatement_return);

        SimSharpParser.whileStatement_return whileStatement58 = default(SimSharpParser.whileStatement_return);

        SimSharpParser.gotoStatement_return gotoStatement59 = default(SimSharpParser.gotoStatement_return);

        SimSharpParser.connectionStatement_return connectionStatement60 = default(SimSharpParser.connectionStatement_return);

        SimSharpParser.block_return block61 = default(SimSharpParser.block_return);

        SimSharpParser.activationStatement_return activationStatement62 = default(SimSharpParser.activationStatement_return);

        SimSharpParser.dummyStatement_return dummyStatement63 = default(SimSharpParser.dummyStatement_return);



        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:239:2: ( ( prefixedBlock )=> prefixedBlock | ( objectGenerator ( SCOLON | END ) )=> objectGenerator | ( assignmentStatement )=> assignmentStatement | procedureStatement | whileStatement | gotoStatement | connectionStatement | block | activationStatement | dummyStatement )
            int alt15 = 10;
            alt15 = dfa15.Predict(input);
            switch (alt15) 
            {
                case 1 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:239:4: ( prefixedBlock )=> prefixedBlock
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	PushFollow(FOLLOW_prefixedBlock_in_unconditionalStatement1158);
                    	prefixedBlock54 = prefixedBlock();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, prefixedBlock54.Tree);

                    }
                    break;
                case 2 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:240:4: ( objectGenerator ( SCOLON | END ) )=> objectGenerator
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	PushFollow(FOLLOW_objectGenerator_in_unconditionalStatement1175);
                    	objectGenerator55 = objectGenerator();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, objectGenerator55.Tree);

                    }
                    break;
                case 3 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:241:4: ( assignmentStatement )=> assignmentStatement
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	PushFollow(FOLLOW_assignmentStatement_in_unconditionalStatement1186);
                    	assignmentStatement56 = assignmentStatement();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, assignmentStatement56.Tree);

                    }
                    break;
                case 4 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:242:4: procedureStatement
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	PushFollow(FOLLOW_procedureStatement_in_unconditionalStatement1191);
                    	procedureStatement57 = procedureStatement();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, procedureStatement57.Tree);

                    }
                    break;
                case 5 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:244:11: whileStatement
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	PushFollow(FOLLOW_whileStatement_in_unconditionalStatement1204);
                    	whileStatement58 = whileStatement();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, whileStatement58.Tree);

                    }
                    break;
                case 6 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:245:11: gotoStatement
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	PushFollow(FOLLOW_gotoStatement_in_unconditionalStatement1248);
                    	gotoStatement59 = gotoStatement();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, gotoStatement59.Tree);

                    }
                    break;
                case 7 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:246:11: connectionStatement
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	PushFollow(FOLLOW_connectionStatement_in_unconditionalStatement1293);
                    	connectionStatement60 = connectionStatement();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, connectionStatement60.Tree);

                    }
                    break;
                case 8 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:247:11: block
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	PushFollow(FOLLOW_block_in_unconditionalStatement1332);
                    	block61 = block();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, block61.Tree);

                    }
                    break;
                case 9 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:248:11: activationStatement
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	PushFollow(FOLLOW_activationStatement_in_unconditionalStatement1344);
                    	activationStatement62 = activationStatement();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, activationStatement62.Tree);

                    }
                    break;
                case 10 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:250:11: dummyStatement
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	PushFollow(FOLLOW_dummyStatement_in_unconditionalStatement1358);
                    	dummyStatement63 = dummyStatement();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, dummyStatement63.Tree);

                    }
                    break;

            }
            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "unconditionalStatement"

    public class procedureStatement_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "procedureStatement"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:255:1: procedureStatement : ( primaryIdentifier )=> postfixExpression -> ^( MethCall postfixExpression ) ;
    public SimSharpParser.procedureStatement_return procedureStatement() // throws RecognitionException [1]
    {   
        SimSharpParser.procedureStatement_return retval = new SimSharpParser.procedureStatement_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        SimSharpParser.postfixExpression_return postfixExpression64 = default(SimSharpParser.postfixExpression_return);


        RewriteRuleSubtreeStream stream_postfixExpression = new RewriteRuleSubtreeStream(adaptor,"rule postfixExpression");
        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:256:2: ( ( primaryIdentifier )=> postfixExpression -> ^( MethCall postfixExpression ) )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:256:4: ( primaryIdentifier )=> postfixExpression
            {
            	PushFollow(FOLLOW_postfixExpression_in_procedureStatement1386);
            	postfixExpression64 = postfixExpression();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( (state.backtracking==0) ) stream_postfixExpression.Add(postfixExpression64.Tree);


            	// AST REWRITE
            	// elements:          postfixExpression
            	// token labels:      
            	// rule labels:       retval
            	// token list labels: 
            	// rule list labels:  
            	// wildcard labels: 
            	if ( (state.backtracking==0) ) {
            	retval.Tree = root_0;
            	RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval!=null ? retval.Tree : null);

            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();
            	// 256:45: -> ^( MethCall postfixExpression )
            	{
            	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:256:48: ^( MethCall postfixExpression )
            	    {
            	    SimSharpTreeNode root_1 = (SimSharpTreeNode)adaptor.GetNilNode();
            	    root_1 = (SimSharpTreeNode)adaptor.BecomeRoot((SimSharpTreeNode)adaptor.Create(MethCall, "MethCall"), root_1);

            	    adaptor.AddChild(root_1, stream_postfixExpression.NextTree());

            	    adaptor.AddChild(root_0, root_1);
            	    }

            	}

            	retval.Tree = root_0;retval.Tree = root_0;}
            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "procedureStatement"

    public class assignmentStatement_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "assignmentStatement"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:261:1: assignmentStatement : destination assignmentOp ( ( ( assignmentStatement )=> assignmentStatement -> ^( assignmentOp destination assignmentStatement ) ) | expression -> ^( assignmentOp destination expression ) ) ;
    public SimSharpParser.assignmentStatement_return assignmentStatement() // throws RecognitionException [1]
    {   
        SimSharpParser.assignmentStatement_return retval = new SimSharpParser.assignmentStatement_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        SimSharpParser.destination_return destination65 = default(SimSharpParser.destination_return);

        SimSharpParser.assignmentOp_return assignmentOp66 = default(SimSharpParser.assignmentOp_return);

        SimSharpParser.assignmentStatement_return assignmentStatement67 = default(SimSharpParser.assignmentStatement_return);

        SimSharpParser.expression_return expression68 = default(SimSharpParser.expression_return);


        RewriteRuleSubtreeStream stream_expression = new RewriteRuleSubtreeStream(adaptor,"rule expression");
        RewriteRuleSubtreeStream stream_assignmentStatement = new RewriteRuleSubtreeStream(adaptor,"rule assignmentStatement");
        RewriteRuleSubtreeStream stream_destination = new RewriteRuleSubtreeStream(adaptor,"rule destination");
        RewriteRuleSubtreeStream stream_assignmentOp = new RewriteRuleSubtreeStream(adaptor,"rule assignmentOp");
        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:262:2: ( destination assignmentOp ( ( ( assignmentStatement )=> assignmentStatement -> ^( assignmentOp destination assignmentStatement ) ) | expression -> ^( assignmentOp destination expression ) ) )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:262:4: destination assignmentOp ( ( ( assignmentStatement )=> assignmentStatement -> ^( assignmentOp destination assignmentStatement ) ) | expression -> ^( assignmentOp destination expression ) )
            {
            	PushFollow(FOLLOW_destination_in_assignmentStatement1414);
            	destination65 = destination();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( (state.backtracking==0) ) stream_destination.Add(destination65.Tree);
            	PushFollow(FOLLOW_assignmentOp_in_assignmentStatement1416);
            	assignmentOp66 = assignmentOp();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( (state.backtracking==0) ) stream_assignmentOp.Add(assignmentOp66.Tree);
            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:263:3: ( ( ( assignmentStatement )=> assignmentStatement -> ^( assignmentOp destination assignmentStatement ) ) | expression -> ^( assignmentOp destination expression ) )
            	int alt16 = 2;
            	alt16 = dfa16.Predict(input);
            	switch (alt16) 
            	{
            	    case 1 :
            	        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:263:5: ( ( assignmentStatement )=> assignmentStatement -> ^( assignmentOp destination assignmentStatement ) )
            	        {
            	        	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:263:5: ( ( assignmentStatement )=> assignmentStatement -> ^( assignmentOp destination assignmentStatement ) )
            	        	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:263:6: ( assignmentStatement )=> assignmentStatement
            	        	{
            	        		PushFollow(FOLLOW_assignmentStatement_in_assignmentStatement1430);
            	        		assignmentStatement67 = assignmentStatement();
            	        		state.followingStackPointer--;
            	        		if (state.failed) return retval;
            	        		if ( (state.backtracking==0) ) stream_assignmentStatement.Add(assignmentStatement67.Tree);


            	        		// AST REWRITE
            	        		// elements:          assignmentOp, assignmentStatement, destination
            	        		// token labels:      
            	        		// rule labels:       retval
            	        		// token list labels: 
            	        		// rule list labels:  
            	        		// wildcard labels: 
            	        		if ( (state.backtracking==0) ) {
            	        		retval.Tree = root_0;
            	        		RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval!=null ? retval.Tree : null);

            	        		root_0 = (SimSharpTreeNode)adaptor.GetNilNode();
            	        		// 263:53: -> ^( assignmentOp destination assignmentStatement )
            	        		{
            	        		    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:263:56: ^( assignmentOp destination assignmentStatement )
            	        		    {
            	        		    SimSharpTreeNode root_1 = (SimSharpTreeNode)adaptor.GetNilNode();
            	        		    root_1 = (SimSharpTreeNode)adaptor.BecomeRoot(stream_assignmentOp.NextNode(), root_1);

            	        		    adaptor.AddChild(root_1, stream_destination.NextTree());
            	        		    adaptor.AddChild(root_1, stream_assignmentStatement.NextTree());

            	        		    adaptor.AddChild(root_0, root_1);
            	        		    }

            	        		}

            	        		retval.Tree = root_0;retval.Tree = root_0;}
            	        	}


            	        }
            	        break;
            	    case 2 :
            	        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:264:5: expression
            	        {
            	        	PushFollow(FOLLOW_expression_in_assignmentStatement1450);
            	        	expression68 = expression();
            	        	state.followingStackPointer--;
            	        	if (state.failed) return retval;
            	        	if ( (state.backtracking==0) ) stream_expression.Add(expression68.Tree);


            	        	// AST REWRITE
            	        	// elements:          assignmentOp, expression, destination
            	        	// token labels:      
            	        	// rule labels:       retval
            	        	// token list labels: 
            	        	// rule list labels:  
            	        	// wildcard labels: 
            	        	if ( (state.backtracking==0) ) {
            	        	retval.Tree = root_0;
            	        	RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval!=null ? retval.Tree : null);

            	        	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();
            	        	// 264:16: -> ^( assignmentOp destination expression )
            	        	{
            	        	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:264:19: ^( assignmentOp destination expression )
            	        	    {
            	        	    SimSharpTreeNode root_1 = (SimSharpTreeNode)adaptor.GetNilNode();
            	        	    root_1 = (SimSharpTreeNode)adaptor.BecomeRoot(stream_assignmentOp.NextNode(), root_1);

            	        	    adaptor.AddChild(root_1, stream_destination.NextTree());
            	        	    adaptor.AddChild(root_1, stream_expression.NextTree());

            	        	    adaptor.AddChild(root_0, root_1);
            	        	    }

            	        	}

            	        	retval.Tree = root_0;retval.Tree = root_0;}
            	        }
            	        break;

            	}


            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "assignmentStatement"

    public class destination_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "destination"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:268:1: destination : postfixExpression ;
    public SimSharpParser.destination_return destination() // throws RecognitionException [1]
    {   
        SimSharpParser.destination_return retval = new SimSharpParser.destination_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        SimSharpParser.postfixExpression_return postfixExpression69 = default(SimSharpParser.postfixExpression_return);



        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:269:2: ( postfixExpression )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:269:4: postfixExpression
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	if ( (state.backtracking==0) )
            	{
            	   assignment = true; 
            	}
            	PushFollow(FOLLOW_postfixExpression_in_destination1483);
            	postfixExpression69 = postfixExpression();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, postfixExpression69.Tree);
            	if ( (state.backtracking==0) )
            	{
            	   assignment = false; 
            	}

            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "destination"

    public class assignmentOp_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "assignmentOp"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:274:1: assignmentOp : ( VALASSIGN | REFASSIGN );
    public SimSharpParser.assignmentOp_return assignmentOp() // throws RecognitionException [1]
    {   
        SimSharpParser.assignmentOp_return retval = new SimSharpParser.assignmentOp_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken set70 = null;

        SimSharpTreeNode set70_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:275:2: ( VALASSIGN | REFASSIGN )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	set70 = (IToken)input.LT(1);
            	if ( (input.LA(1) >= VALASSIGN && input.LA(1) <= REFASSIGN) ) 
            	{
            	    input.Consume();
            	    if ( state.backtracking == 0 ) adaptor.AddChild(root_0, (SimSharpTreeNode)adaptor.Create(set70));
            	    state.errorRecovery = false;state.failed = false;
            	}
            	else 
            	{
            	    if ( state.backtracking > 0 ) {state.failed = true; return retval;}
            	    MismatchedSetException mse = new MismatchedSetException(null,input);
            	    throw mse;
            	}


            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "assignmentOp"

    public class conditionalStatement_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "conditionalStatement"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:279:1: conditionalStatement : ifClause ( unconditionalStatement | forStatement ) ( ( ELSE )=> ELSE statement )? ;
    public SimSharpParser.conditionalStatement_return conditionalStatement() // throws RecognitionException [1]
    {   
        SimSharpParser.conditionalStatement_return retval = new SimSharpParser.conditionalStatement_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken ELSE74 = null;
        SimSharpParser.ifClause_return ifClause71 = default(SimSharpParser.ifClause_return);

        SimSharpParser.unconditionalStatement_return unconditionalStatement72 = default(SimSharpParser.unconditionalStatement_return);

        SimSharpParser.forStatement_return forStatement73 = default(SimSharpParser.forStatement_return);

        SimSharpParser.statement_return statement75 = default(SimSharpParser.statement_return);


        SimSharpTreeNode ELSE74_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:280:2: ( ifClause ( unconditionalStatement | forStatement ) ( ( ELSE )=> ELSE statement )? )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:280:4: ifClause ( unconditionalStatement | forStatement ) ( ( ELSE )=> ELSE statement )?
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	PushFollow(FOLLOW_ifClause_in_conditionalStatement1517);
            	ifClause71 = ifClause();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) root_0 = (SimSharpTreeNode)adaptor.BecomeRoot(ifClause71.Tree, root_0);
            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:280:14: ( unconditionalStatement | forStatement )
            	int alt17 = 2;
            	alt17 = dfa17.Predict(input);
            	switch (alt17) 
            	{
            	    case 1 :
            	        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:280:15: unconditionalStatement
            	        {
            	        	PushFollow(FOLLOW_unconditionalStatement_in_conditionalStatement1521);
            	        	unconditionalStatement72 = unconditionalStatement();
            	        	state.followingStackPointer--;
            	        	if (state.failed) return retval;
            	        	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, unconditionalStatement72.Tree);

            	        }
            	        break;
            	    case 2 :
            	        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:280:38: forStatement
            	        {
            	        	PushFollow(FOLLOW_forStatement_in_conditionalStatement1523);
            	        	forStatement73 = forStatement();
            	        	state.followingStackPointer--;
            	        	if (state.failed) return retval;
            	        	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, forStatement73.Tree);

            	        }
            	        break;

            	}

            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:280:52: ( ( ELSE )=> ELSE statement )?
            	int alt18 = 2;
            	int LA18_0 = input.LA(1);

            	if ( (LA18_0 == ELSE) )
            	{
            	    int LA18_1 = input.LA(2);

            	    if ( (synpred9_SimSharp()) )
            	    {
            	        alt18 = 1;
            	    }
            	}
            	switch (alt18) 
            	{
            	    case 1 :
            	        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:280:54: ( ELSE )=> ELSE statement
            	        {
            	        	ELSE74=(IToken)Match(input,ELSE,FOLLOW_ELSE_in_conditionalStatement1534); if (state.failed) return retval;
            	        	PushFollow(FOLLOW_statement_in_conditionalStatement1537);
            	        	statement75 = statement();
            	        	state.followingStackPointer--;
            	        	if (state.failed) return retval;
            	        	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, statement75.Tree);

            	        }
            	        break;

            	}


            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "conditionalStatement"

    public class ifClause_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "ifClause"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:283:1: ifClause : IF booleanExpression THEN ;
    public SimSharpParser.ifClause_return ifClause() // throws RecognitionException [1]
    {   
        SimSharpParser.ifClause_return retval = new SimSharpParser.ifClause_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken IF76 = null;
        IToken THEN78 = null;
        SimSharpParser.booleanExpression_return booleanExpression77 = default(SimSharpParser.booleanExpression_return);


        SimSharpTreeNode IF76_tree=null;
        SimSharpTreeNode THEN78_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:284:2: ( IF booleanExpression THEN )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:284:4: IF booleanExpression THEN
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	IF76=(IToken)Match(input,IF,FOLLOW_IF_in_ifClause1551); if (state.failed) return retval;
            	if ( state.backtracking == 0 )
            	{IF76_tree = (SimSharpTreeNode)adaptor.Create(IF76);
            		root_0 = (SimSharpTreeNode)adaptor.BecomeRoot(IF76_tree, root_0);
            	}
            	PushFollow(FOLLOW_booleanExpression_in_ifClause1554);
            	booleanExpression77 = booleanExpression();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, booleanExpression77.Tree);
            	THEN78=(IToken)Match(input,THEN,FOLLOW_THEN_in_ifClause1556); if (state.failed) return retval;

            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "ifClause"

    public class whileStatement_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "whileStatement"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:287:1: whileStatement : WHILE booleanExpression DO statement ;
    public SimSharpParser.whileStatement_return whileStatement() // throws RecognitionException [1]
    {   
        SimSharpParser.whileStatement_return retval = new SimSharpParser.whileStatement_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken WHILE79 = null;
        IToken DO81 = null;
        SimSharpParser.booleanExpression_return booleanExpression80 = default(SimSharpParser.booleanExpression_return);

        SimSharpParser.statement_return statement82 = default(SimSharpParser.statement_return);


        SimSharpTreeNode WHILE79_tree=null;
        SimSharpTreeNode DO81_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:288:2: ( WHILE booleanExpression DO statement )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:288:4: WHILE booleanExpression DO statement
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	WHILE79=(IToken)Match(input,WHILE,FOLLOW_WHILE_in_whileStatement1568); if (state.failed) return retval;
            	if ( state.backtracking == 0 )
            	{WHILE79_tree = (SimSharpTreeNode)adaptor.Create(WHILE79);
            		root_0 = (SimSharpTreeNode)adaptor.BecomeRoot(WHILE79_tree, root_0);
            	}
            	PushFollow(FOLLOW_booleanExpression_in_whileStatement1571);
            	booleanExpression80 = booleanExpression();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, booleanExpression80.Tree);
            	DO81=(IToken)Match(input,DO,FOLLOW_DO_in_whileStatement1573); if (state.failed) return retval;
            	PushFollow(FOLLOW_statement_in_whileStatement1576);
            	statement82 = statement();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, statement82.Tree);

            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "whileStatement"

    public class forStatement_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "forStatement"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:291:1: forStatement : FOR simpleVariable forRightPart DO statement ;
    public SimSharpParser.forStatement_return forStatement() // throws RecognitionException [1]
    {   
        SimSharpParser.forStatement_return retval = new SimSharpParser.forStatement_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken FOR83 = null;
        IToken DO86 = null;
        SimSharpParser.simpleVariable_return simpleVariable84 = default(SimSharpParser.simpleVariable_return);

        SimSharpParser.forRightPart_return forRightPart85 = default(SimSharpParser.forRightPart_return);

        SimSharpParser.statement_return statement87 = default(SimSharpParser.statement_return);


        SimSharpTreeNode FOR83_tree=null;
        SimSharpTreeNode DO86_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:292:2: ( FOR simpleVariable forRightPart DO statement )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:292:4: FOR simpleVariable forRightPart DO statement
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	FOR83=(IToken)Match(input,FOR,FOLLOW_FOR_in_forStatement1587); if (state.failed) return retval;
            	if ( state.backtracking == 0 )
            	{FOR83_tree = (SimSharpTreeNode)adaptor.Create(FOR83);
            		root_0 = (SimSharpTreeNode)adaptor.BecomeRoot(FOR83_tree, root_0);
            	}
            	PushFollow(FOLLOW_simpleVariable_in_forStatement1590);
            	simpleVariable84 = simpleVariable();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, simpleVariable84.Tree);
            	PushFollow(FOLLOW_forRightPart_in_forStatement1592);
            	forRightPart85 = forRightPart();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, forRightPart85.Tree);
            	DO86=(IToken)Match(input,DO,FOLLOW_DO_in_forStatement1594); if (state.failed) return retval;
            	PushFollow(FOLLOW_statement_in_forStatement1597);
            	statement87 = statement();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, statement87.Tree);

            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "forStatement"

    public class simpleVariable_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "simpleVariable"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:296:1: simpleVariable : ID ;
    public SimSharpParser.simpleVariable_return simpleVariable() // throws RecognitionException [1]
    {   
        SimSharpParser.simpleVariable_return retval = new SimSharpParser.simpleVariable_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken ID88 = null;

        SimSharpTreeNode ID88_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:297:2: ( ID )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:297:4: ID
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	ID88=(IToken)Match(input,ID,FOLLOW_ID_in_simpleVariable1611); if (state.failed) return retval;
            	if ( state.backtracking == 0 )
            	{ID88_tree = (SimSharpTreeNode)adaptor.Create(ID88);
            		adaptor.AddChild(root_0, ID88_tree);
            	}

            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "simpleVariable"

    public class forRightPart_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "forRightPart"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:300:1: forRightPart : ( VALASSIGN valueForListElement ( COMMA valueForListElement )* | REFASSIGN referenceForListElement ( COMMA referenceForListElement )* );
    public SimSharpParser.forRightPart_return forRightPart() // throws RecognitionException [1]
    {   
        SimSharpParser.forRightPart_return retval = new SimSharpParser.forRightPart_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken VALASSIGN89 = null;
        IToken COMMA91 = null;
        IToken REFASSIGN93 = null;
        IToken COMMA95 = null;
        SimSharpParser.valueForListElement_return valueForListElement90 = default(SimSharpParser.valueForListElement_return);

        SimSharpParser.valueForListElement_return valueForListElement92 = default(SimSharpParser.valueForListElement_return);

        SimSharpParser.referenceForListElement_return referenceForListElement94 = default(SimSharpParser.referenceForListElement_return);

        SimSharpParser.referenceForListElement_return referenceForListElement96 = default(SimSharpParser.referenceForListElement_return);


        SimSharpTreeNode VALASSIGN89_tree=null;
        SimSharpTreeNode COMMA91_tree=null;
        SimSharpTreeNode REFASSIGN93_tree=null;
        SimSharpTreeNode COMMA95_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:301:2: ( VALASSIGN valueForListElement ( COMMA valueForListElement )* | REFASSIGN referenceForListElement ( COMMA referenceForListElement )* )
            int alt21 = 2;
            int LA21_0 = input.LA(1);

            if ( (LA21_0 == VALASSIGN) )
            {
                alt21 = 1;
            }
            else if ( (LA21_0 == REFASSIGN) )
            {
                alt21 = 2;
            }
            else 
            {
                if ( state.backtracking > 0 ) {state.failed = true; return retval;}
                NoViableAltException nvae_d21s0 =
                    new NoViableAltException("", 21, 0, input);

                throw nvae_d21s0;
            }
            switch (alt21) 
            {
                case 1 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:301:4: VALASSIGN valueForListElement ( COMMA valueForListElement )*
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	VALASSIGN89=(IToken)Match(input,VALASSIGN,FOLLOW_VALASSIGN_in_forRightPart1622); if (state.failed) return retval;
                    	if ( state.backtracking == 0 )
                    	{VALASSIGN89_tree = (SimSharpTreeNode)adaptor.Create(VALASSIGN89);
                    		root_0 = (SimSharpTreeNode)adaptor.BecomeRoot(VALASSIGN89_tree, root_0);
                    	}
                    	PushFollow(FOLLOW_valueForListElement_in_forRightPart1625);
                    	valueForListElement90 = valueForListElement();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, valueForListElement90.Tree);
                    	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:301:35: ( COMMA valueForListElement )*
                    	do 
                    	{
                    	    int alt19 = 2;
                    	    int LA19_0 = input.LA(1);

                    	    if ( (LA19_0 == COMMA) )
                    	    {
                    	        alt19 = 1;
                    	    }


                    	    switch (alt19) 
                    		{
                    			case 1 :
                    			    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:301:37: COMMA valueForListElement
                    			    {
                    			    	COMMA91=(IToken)Match(input,COMMA,FOLLOW_COMMA_in_forRightPart1629); if (state.failed) return retval;
                    			    	PushFollow(FOLLOW_valueForListElement_in_forRightPart1632);
                    			    	valueForListElement92 = valueForListElement();
                    			    	state.followingStackPointer--;
                    			    	if (state.failed) return retval;
                    			    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, valueForListElement92.Tree);

                    			    }
                    			    break;

                    			default:
                    			    goto loop19;
                    	    }
                    	} while (true);

                    	loop19:
                    		;	// Stops C# compiler whining that label 'loop19' has no statements


                    }
                    break;
                case 2 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:302:4: REFASSIGN referenceForListElement ( COMMA referenceForListElement )*
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	REFASSIGN93=(IToken)Match(input,REFASSIGN,FOLLOW_REFASSIGN_in_forRightPart1641); if (state.failed) return retval;
                    	if ( state.backtracking == 0 )
                    	{REFASSIGN93_tree = (SimSharpTreeNode)adaptor.Create(REFASSIGN93);
                    		root_0 = (SimSharpTreeNode)adaptor.BecomeRoot(REFASSIGN93_tree, root_0);
                    	}
                    	PushFollow(FOLLOW_referenceForListElement_in_forRightPart1644);
                    	referenceForListElement94 = referenceForListElement();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, referenceForListElement94.Tree);
                    	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:302:39: ( COMMA referenceForListElement )*
                    	do 
                    	{
                    	    int alt20 = 2;
                    	    int LA20_0 = input.LA(1);

                    	    if ( (LA20_0 == COMMA) )
                    	    {
                    	        alt20 = 1;
                    	    }


                    	    switch (alt20) 
                    		{
                    			case 1 :
                    			    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:302:41: COMMA referenceForListElement
                    			    {
                    			    	COMMA95=(IToken)Match(input,COMMA,FOLLOW_COMMA_in_forRightPart1648); if (state.failed) return retval;
                    			    	PushFollow(FOLLOW_referenceForListElement_in_forRightPart1651);
                    			    	referenceForListElement96 = referenceForListElement();
                    			    	state.followingStackPointer--;
                    			    	if (state.failed) return retval;
                    			    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, referenceForListElement96.Tree);

                    			    }
                    			    break;

                    			default:
                    			    goto loop20;
                    	    }
                    	} while (true);

                    	loop20:
                    		;	// Stops C# compiler whining that label 'loop20' has no statements


                    }
                    break;

            }
            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "forRightPart"

    public class valueForListElement_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "valueForListElement"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:305:1: valueForListElement : expression ( ( WHILE b= booleanExpression )? -> ^( WhileListElement expression ( WHILE $b)? ) | ( STEP step= arithmeticExpression UNTIL until= arithmeticExpression -> ^( StepListElement expression STEP $step $step UNTIL $until) ) ) ;
    public SimSharpParser.valueForListElement_return valueForListElement() // throws RecognitionException [1]
    {   
        SimSharpParser.valueForListElement_return retval = new SimSharpParser.valueForListElement_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken WHILE98 = null;
        IToken STEP99 = null;
        IToken UNTIL100 = null;
        SimSharpParser.booleanExpression_return b = default(SimSharpParser.booleanExpression_return);

        SimSharpParser.arithmeticExpression_return step = default(SimSharpParser.arithmeticExpression_return);

        SimSharpParser.arithmeticExpression_return until = default(SimSharpParser.arithmeticExpression_return);

        SimSharpParser.expression_return expression97 = default(SimSharpParser.expression_return);


        SimSharpTreeNode WHILE98_tree=null;
        SimSharpTreeNode STEP99_tree=null;
        SimSharpTreeNode UNTIL100_tree=null;
        RewriteRuleTokenStream stream_STEP = new RewriteRuleTokenStream(adaptor,"token STEP");
        RewriteRuleTokenStream stream_WHILE = new RewriteRuleTokenStream(adaptor,"token WHILE");
        RewriteRuleTokenStream stream_UNTIL = new RewriteRuleTokenStream(adaptor,"token UNTIL");
        RewriteRuleSubtreeStream stream_expression = new RewriteRuleSubtreeStream(adaptor,"rule expression");
        RewriteRuleSubtreeStream stream_arithmeticExpression = new RewriteRuleSubtreeStream(adaptor,"rule arithmeticExpression");
        RewriteRuleSubtreeStream stream_booleanExpression = new RewriteRuleSubtreeStream(adaptor,"rule booleanExpression");
        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:306:2: ( expression ( ( WHILE b= booleanExpression )? -> ^( WhileListElement expression ( WHILE $b)? ) | ( STEP step= arithmeticExpression UNTIL until= arithmeticExpression -> ^( StepListElement expression STEP $step $step UNTIL $until) ) ) )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:306:4: expression ( ( WHILE b= booleanExpression )? -> ^( WhileListElement expression ( WHILE $b)? ) | ( STEP step= arithmeticExpression UNTIL until= arithmeticExpression -> ^( StepListElement expression STEP $step $step UNTIL $until) ) )
            {
            	PushFollow(FOLLOW_expression_in_valueForListElement1666);
            	expression97 = expression();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( (state.backtracking==0) ) stream_expression.Add(expression97.Tree);
            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:307:3: ( ( WHILE b= booleanExpression )? -> ^( WhileListElement expression ( WHILE $b)? ) | ( STEP step= arithmeticExpression UNTIL until= arithmeticExpression -> ^( StepListElement expression STEP $step $step UNTIL $until) ) )
            	int alt23 = 2;
            	int LA23_0 = input.LA(1);

            	if ( (LA23_0 == COMMA || (LA23_0 >= WHILE && LA23_0 <= DO)) )
            	{
            	    alt23 = 1;
            	}
            	else if ( (LA23_0 == STEP) )
            	{
            	    alt23 = 2;
            	}
            	else 
            	{
            	    if ( state.backtracking > 0 ) {state.failed = true; return retval;}
            	    NoViableAltException nvae_d23s0 =
            	        new NoViableAltException("", 23, 0, input);

            	    throw nvae_d23s0;
            	}
            	switch (alt23) 
            	{
            	    case 1 :
            	        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:308:4: ( WHILE b= booleanExpression )?
            	        {
            	        	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:308:4: ( WHILE b= booleanExpression )?
            	        	int alt22 = 2;
            	        	int LA22_0 = input.LA(1);

            	        	if ( (LA22_0 == WHILE) )
            	        	{
            	        	    alt22 = 1;
            	        	}
            	        	switch (alt22) 
            	        	{
            	        	    case 1 :
            	        	        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:308:6: WHILE b= booleanExpression
            	        	        {
            	        	        	WHILE98=(IToken)Match(input,WHILE,FOLLOW_WHILE_in_valueForListElement1678); if (state.failed) return retval; 
            	        	        	if ( (state.backtracking==0) ) stream_WHILE.Add(WHILE98);

            	        	        	PushFollow(FOLLOW_booleanExpression_in_valueForListElement1682);
            	        	        	b = booleanExpression();
            	        	        	state.followingStackPointer--;
            	        	        	if (state.failed) return retval;
            	        	        	if ( (state.backtracking==0) ) stream_booleanExpression.Add(b.Tree);

            	        	        }
            	        	        break;

            	        	}



            	        	// AST REWRITE
            	        	// elements:          b, WHILE, expression
            	        	// token labels:      
            	        	// rule labels:       retval, b
            	        	// token list labels: 
            	        	// rule list labels:  
            	        	// wildcard labels: 
            	        	if ( (state.backtracking==0) ) {
            	        	retval.Tree = root_0;
            	        	RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval!=null ? retval.Tree : null);
            	        	RewriteRuleSubtreeStream stream_b = new RewriteRuleSubtreeStream(adaptor, "rule b", b!=null ? b.Tree : null);

            	        	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();
            	        	// 309:7: -> ^( WhileListElement expression ( WHILE $b)? )
            	        	{
            	        	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:309:10: ^( WhileListElement expression ( WHILE $b)? )
            	        	    {
            	        	    SimSharpTreeNode root_1 = (SimSharpTreeNode)adaptor.GetNilNode();
            	        	    root_1 = (SimSharpTreeNode)adaptor.BecomeRoot((SimSharpTreeNode)adaptor.Create(WhileListElement, "WhileListElement"), root_1);

            	        	    adaptor.AddChild(root_1, stream_expression.NextTree());
            	        	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:309:40: ( WHILE $b)?
            	        	    if ( stream_b.HasNext() || stream_WHILE.HasNext() )
            	        	    {
            	        	        adaptor.AddChild(root_1, stream_WHILE.NextNode());
            	        	        adaptor.AddChild(root_1, stream_b.NextTree());

            	        	    }
            	        	    stream_b.Reset();
            	        	    stream_WHILE.Reset();

            	        	    adaptor.AddChild(root_0, root_1);
            	        	    }

            	        	}

            	        	retval.Tree = root_0;retval.Tree = root_0;}
            	        }
            	        break;
            	    case 2 :
            	        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:310:6: ( STEP step= arithmeticExpression UNTIL until= arithmeticExpression -> ^( StepListElement expression STEP $step $step UNTIL $until) )
            	        {
            	        	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:310:6: ( STEP step= arithmeticExpression UNTIL until= arithmeticExpression -> ^( StepListElement expression STEP $step $step UNTIL $until) )
            	        	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:310:7: STEP step= arithmeticExpression UNTIL until= arithmeticExpression
            	        	{
            	        		STEP99=(IToken)Match(input,STEP,FOLLOW_STEP_in_valueForListElement1716); if (state.failed) return retval; 
            	        		if ( (state.backtracking==0) ) stream_STEP.Add(STEP99);

            	        		PushFollow(FOLLOW_arithmeticExpression_in_valueForListElement1720);
            	        		step = arithmeticExpression();
            	        		state.followingStackPointer--;
            	        		if (state.failed) return retval;
            	        		if ( (state.backtracking==0) ) stream_arithmeticExpression.Add(step.Tree);
            	        		UNTIL100=(IToken)Match(input,UNTIL,FOLLOW_UNTIL_in_valueForListElement1722); if (state.failed) return retval; 
            	        		if ( (state.backtracking==0) ) stream_UNTIL.Add(UNTIL100);

            	        		PushFollow(FOLLOW_arithmeticExpression_in_valueForListElement1726);
            	        		until = arithmeticExpression();
            	        		state.followingStackPointer--;
            	        		if (state.failed) return retval;
            	        		if ( (state.backtracking==0) ) stream_arithmeticExpression.Add(until.Tree);


            	        		// AST REWRITE
            	        		// elements:          expression, step, step, STEP, until, UNTIL
            	        		// token labels:      
            	        		// rule labels:       retval, until, step
            	        		// token list labels: 
            	        		// rule list labels:  
            	        		// wildcard labels: 
            	        		if ( (state.backtracking==0) ) {
            	        		retval.Tree = root_0;
            	        		RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval!=null ? retval.Tree : null);
            	        		RewriteRuleSubtreeStream stream_until = new RewriteRuleSubtreeStream(adaptor, "rule until", until!=null ? until.Tree : null);
            	        		RewriteRuleSubtreeStream stream_step = new RewriteRuleSubtreeStream(adaptor, "rule step", step!=null ? step.Tree : null);

            	        		root_0 = (SimSharpTreeNode)adaptor.GetNilNode();
            	        		// 311:7: -> ^( StepListElement expression STEP $step $step UNTIL $until)
            	        		{
            	        		    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:311:10: ^( StepListElement expression STEP $step $step UNTIL $until)
            	        		    {
            	        		    SimSharpTreeNode root_1 = (SimSharpTreeNode)adaptor.GetNilNode();
            	        		    root_1 = (SimSharpTreeNode)adaptor.BecomeRoot((SimSharpTreeNode)adaptor.Create(StepListElement, "StepListElement"), root_1);

            	        		    adaptor.AddChild(root_1, stream_expression.NextTree());
            	        		    adaptor.AddChild(root_1, stream_STEP.NextNode());
            	        		    adaptor.AddChild(root_1, stream_step.NextTree());
            	        		    adaptor.AddChild(root_1, stream_step.NextTree());
            	        		    adaptor.AddChild(root_1, stream_UNTIL.NextNode());
            	        		    adaptor.AddChild(root_1, stream_until.NextTree());

            	        		    adaptor.AddChild(root_0, root_1);
            	        		    }

            	        		}

            	        		retval.Tree = root_0;retval.Tree = root_0;}
            	        	}


            	        }
            	        break;

            	}


            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "valueForListElement"

    public class referenceForListElement_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "referenceForListElement"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:315:1: referenceForListElement : expression ( WHILE b= booleanExpression )? -> ^( WhileListElement expression ( WHILE $b)? ) ;
    public SimSharpParser.referenceForListElement_return referenceForListElement() // throws RecognitionException [1]
    {   
        SimSharpParser.referenceForListElement_return retval = new SimSharpParser.referenceForListElement_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken WHILE102 = null;
        SimSharpParser.booleanExpression_return b = default(SimSharpParser.booleanExpression_return);

        SimSharpParser.expression_return expression101 = default(SimSharpParser.expression_return);


        SimSharpTreeNode WHILE102_tree=null;
        RewriteRuleTokenStream stream_WHILE = new RewriteRuleTokenStream(adaptor,"token WHILE");
        RewriteRuleSubtreeStream stream_expression = new RewriteRuleSubtreeStream(adaptor,"rule expression");
        RewriteRuleSubtreeStream stream_booleanExpression = new RewriteRuleSubtreeStream(adaptor,"rule booleanExpression");
        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:316:2: ( expression ( WHILE b= booleanExpression )? -> ^( WhileListElement expression ( WHILE $b)? ) )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:316:4: expression ( WHILE b= booleanExpression )?
            {
            	PushFollow(FOLLOW_expression_in_referenceForListElement1771);
            	expression101 = expression();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( (state.backtracking==0) ) stream_expression.Add(expression101.Tree);
            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:316:15: ( WHILE b= booleanExpression )?
            	int alt24 = 2;
            	int LA24_0 = input.LA(1);

            	if ( (LA24_0 == WHILE) )
            	{
            	    alt24 = 1;
            	}
            	switch (alt24) 
            	{
            	    case 1 :
            	        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:316:16: WHILE b= booleanExpression
            	        {
            	        	WHILE102=(IToken)Match(input,WHILE,FOLLOW_WHILE_in_referenceForListElement1774); if (state.failed) return retval; 
            	        	if ( (state.backtracking==0) ) stream_WHILE.Add(WHILE102);

            	        	PushFollow(FOLLOW_booleanExpression_in_referenceForListElement1778);
            	        	b = booleanExpression();
            	        	state.followingStackPointer--;
            	        	if (state.failed) return retval;
            	        	if ( (state.backtracking==0) ) stream_booleanExpression.Add(b.Tree);

            	        }
            	        break;

            	}



            	// AST REWRITE
            	// elements:          WHILE, b, expression
            	// token labels:      
            	// rule labels:       retval, b
            	// token list labels: 
            	// rule list labels:  
            	// wildcard labels: 
            	if ( (state.backtracking==0) ) {
            	retval.Tree = root_0;
            	RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval!=null ? retval.Tree : null);
            	RewriteRuleSubtreeStream stream_b = new RewriteRuleSubtreeStream(adaptor, "rule b", b!=null ? b.Tree : null);

            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();
            	// 316:45: -> ^( WhileListElement expression ( WHILE $b)? )
            	{
            	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:316:48: ^( WhileListElement expression ( WHILE $b)? )
            	    {
            	    SimSharpTreeNode root_1 = (SimSharpTreeNode)adaptor.GetNilNode();
            	    root_1 = (SimSharpTreeNode)adaptor.BecomeRoot((SimSharpTreeNode)adaptor.Create(WhileListElement, "WhileListElement"), root_1);

            	    adaptor.AddChild(root_1, stream_expression.NextTree());
            	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:316:78: ( WHILE $b)?
            	    if ( stream_WHILE.HasNext() || stream_b.HasNext() )
            	    {
            	        adaptor.AddChild(root_1, stream_WHILE.NextNode());
            	        adaptor.AddChild(root_1, stream_b.NextTree());

            	    }
            	    stream_WHILE.Reset();
            	    stream_b.Reset();

            	    adaptor.AddChild(root_0, root_1);
            	    }

            	}

            	retval.Tree = root_0;retval.Tree = root_0;}
            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "referenceForListElement"

    public class gotoStatement_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "gotoStatement"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:319:1: gotoStatement : ( GOTO | GO TO ) designationalExpression -> ^( GoTo designationalExpression ) ;
    public SimSharpParser.gotoStatement_return gotoStatement() // throws RecognitionException [1]
    {   
        SimSharpParser.gotoStatement_return retval = new SimSharpParser.gotoStatement_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken GOTO103 = null;
        IToken GO104 = null;
        IToken TO105 = null;
        SimSharpParser.designationalExpression_return designationalExpression106 = default(SimSharpParser.designationalExpression_return);


        SimSharpTreeNode GOTO103_tree=null;
        SimSharpTreeNode GO104_tree=null;
        SimSharpTreeNode TO105_tree=null;
        RewriteRuleTokenStream stream_GOTO = new RewriteRuleTokenStream(adaptor,"token GOTO");
        RewriteRuleTokenStream stream_GO = new RewriteRuleTokenStream(adaptor,"token GO");
        RewriteRuleTokenStream stream_TO = new RewriteRuleTokenStream(adaptor,"token TO");
        RewriteRuleSubtreeStream stream_designationalExpression = new RewriteRuleSubtreeStream(adaptor,"rule designationalExpression");
        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:320:2: ( ( GOTO | GO TO ) designationalExpression -> ^( GoTo designationalExpression ) )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:320:4: ( GOTO | GO TO ) designationalExpression
            {
            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:320:4: ( GOTO | GO TO )
            	int alt25 = 2;
            	int LA25_0 = input.LA(1);

            	if ( (LA25_0 == GOTO) )
            	{
            	    alt25 = 1;
            	}
            	else if ( (LA25_0 == GO) )
            	{
            	    alt25 = 2;
            	}
            	else 
            	{
            	    if ( state.backtracking > 0 ) {state.failed = true; return retval;}
            	    NoViableAltException nvae_d25s0 =
            	        new NoViableAltException("", 25, 0, input);

            	    throw nvae_d25s0;
            	}
            	switch (alt25) 
            	{
            	    case 1 :
            	        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:320:6: GOTO
            	        {
            	        	GOTO103=(IToken)Match(input,GOTO,FOLLOW_GOTO_in_gotoStatement1810); if (state.failed) return retval; 
            	        	if ( (state.backtracking==0) ) stream_GOTO.Add(GOTO103);


            	        }
            	        break;
            	    case 2 :
            	        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:320:13: GO TO
            	        {
            	        	GO104=(IToken)Match(input,GO,FOLLOW_GO_in_gotoStatement1814); if (state.failed) return retval; 
            	        	if ( (state.backtracking==0) ) stream_GO.Add(GO104);

            	        	TO105=(IToken)Match(input,TO,FOLLOW_TO_in_gotoStatement1816); if (state.failed) return retval; 
            	        	if ( (state.backtracking==0) ) stream_TO.Add(TO105);


            	        }
            	        break;

            	}

            	PushFollow(FOLLOW_designationalExpression_in_gotoStatement1820);
            	designationalExpression106 = designationalExpression();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( (state.backtracking==0) ) stream_designationalExpression.Add(designationalExpression106.Tree);


            	// AST REWRITE
            	// elements:          designationalExpression
            	// token labels:      
            	// rule labels:       retval
            	// token list labels: 
            	// rule list labels:  
            	// wildcard labels: 
            	if ( (state.backtracking==0) ) {
            	retval.Tree = root_0;
            	RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval!=null ? retval.Tree : null);

            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();
            	// 320:46: -> ^( GoTo designationalExpression )
            	{
            	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:320:49: ^( GoTo designationalExpression )
            	    {
            	    SimSharpTreeNode root_1 = (SimSharpTreeNode)adaptor.GetNilNode();
            	    root_1 = (SimSharpTreeNode)adaptor.BecomeRoot((SimSharpTreeNode)adaptor.Create(GoTo, "GoTo"), root_1);

            	    adaptor.AddChild(root_1, stream_designationalExpression.NextTree());

            	    adaptor.AddChild(root_0, root_1);
            	    }

            	}

            	retval.Tree = root_0;retval.Tree = root_0;}
            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "gotoStatement"

    public class connectionStatement_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "connectionStatement"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:323:1: connectionStatement : INSPECT objectExpression ( ( whenClause ( ( whenClause )=> whenClause )* ( ( otherwiseClause )=> otherwiseClause )? ) | ( DO connectionBlock2 ( ( otherwiseClause )=> otherwiseClause )? ) ) ;
    public SimSharpParser.connectionStatement_return connectionStatement() // throws RecognitionException [1]
    {   
        SimSharpParser.connectionStatement_return retval = new SimSharpParser.connectionStatement_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken INSPECT107 = null;
        IToken DO112 = null;
        SimSharpParser.objectExpression_return objectExpression108 = default(SimSharpParser.objectExpression_return);

        SimSharpParser.whenClause_return whenClause109 = default(SimSharpParser.whenClause_return);

        SimSharpParser.whenClause_return whenClause110 = default(SimSharpParser.whenClause_return);

        SimSharpParser.otherwiseClause_return otherwiseClause111 = default(SimSharpParser.otherwiseClause_return);

        SimSharpParser.connectionBlock2_return connectionBlock2113 = default(SimSharpParser.connectionBlock2_return);

        SimSharpParser.otherwiseClause_return otherwiseClause114 = default(SimSharpParser.otherwiseClause_return);


        SimSharpTreeNode INSPECT107_tree=null;
        SimSharpTreeNode DO112_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:324:2: ( INSPECT objectExpression ( ( whenClause ( ( whenClause )=> whenClause )* ( ( otherwiseClause )=> otherwiseClause )? ) | ( DO connectionBlock2 ( ( otherwiseClause )=> otherwiseClause )? ) ) )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:324:4: INSPECT objectExpression ( ( whenClause ( ( whenClause )=> whenClause )* ( ( otherwiseClause )=> otherwiseClause )? ) | ( DO connectionBlock2 ( ( otherwiseClause )=> otherwiseClause )? ) )
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	INSPECT107=(IToken)Match(input,INSPECT,FOLLOW_INSPECT_in_connectionStatement1841); if (state.failed) return retval;
            	if ( state.backtracking == 0 )
            	{INSPECT107_tree = (SimSharpTreeNode)adaptor.Create(INSPECT107);
            		root_0 = (SimSharpTreeNode)adaptor.BecomeRoot(INSPECT107_tree, root_0);
            	}
            	PushFollow(FOLLOW_objectExpression_in_connectionStatement1844);
            	objectExpression108 = objectExpression();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, objectExpression108.Tree);
            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:324:30: ( ( whenClause ( ( whenClause )=> whenClause )* ( ( otherwiseClause )=> otherwiseClause )? ) | ( DO connectionBlock2 ( ( otherwiseClause )=> otherwiseClause )? ) )
            	int alt29 = 2;
            	int LA29_0 = input.LA(1);

            	if ( (LA29_0 == WHEN) )
            	{
            	    alt29 = 1;
            	}
            	else if ( (LA29_0 == DO) )
            	{
            	    alt29 = 2;
            	}
            	else 
            	{
            	    if ( state.backtracking > 0 ) {state.failed = true; return retval;}
            	    NoViableAltException nvae_d29s0 =
            	        new NoViableAltException("", 29, 0, input);

            	    throw nvae_d29s0;
            	}
            	switch (alt29) 
            	{
            	    case 1 :
            	        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:324:32: ( whenClause ( ( whenClause )=> whenClause )* ( ( otherwiseClause )=> otherwiseClause )? )
            	        {
            	        	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:324:32: ( whenClause ( ( whenClause )=> whenClause )* ( ( otherwiseClause )=> otherwiseClause )? )
            	        	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:324:34: whenClause ( ( whenClause )=> whenClause )* ( ( otherwiseClause )=> otherwiseClause )?
            	        	{
            	        		PushFollow(FOLLOW_whenClause_in_connectionStatement1850);
            	        		whenClause109 = whenClause();
            	        		state.followingStackPointer--;
            	        		if (state.failed) return retval;
            	        		if ( state.backtracking == 0 ) adaptor.AddChild(root_0, whenClause109.Tree);
            	        		// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:324:45: ( ( whenClause )=> whenClause )*
            	        		do 
            	        		{
            	        		    int alt26 = 2;
            	        		    int LA26_0 = input.LA(1);

            	        		    if ( (LA26_0 == WHEN) )
            	        		    {
            	        		        int LA26_4 = input.LA(2);

            	        		        if ( (synpred10_SimSharp()) )
            	        		        {
            	        		            alt26 = 1;
            	        		        }


            	        		    }


            	        		    switch (alt26) 
            	        			{
            	        				case 1 :
            	        				    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:324:47: ( whenClause )=> whenClause
            	        				    {
            	        				    	PushFollow(FOLLOW_whenClause_in_connectionStatement1860);
            	        				    	whenClause110 = whenClause();
            	        				    	state.followingStackPointer--;
            	        				    	if (state.failed) return retval;
            	        				    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, whenClause110.Tree);

            	        				    }
            	        				    break;

            	        				default:
            	        				    goto loop26;
            	        		    }
            	        		} while (true);

            	        		loop26:
            	        			;	// Stops C# compiler whining that label 'loop26' has no statements

            	        		// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:324:77: ( ( otherwiseClause )=> otherwiseClause )?
            	        		int alt27 = 2;
            	        		int LA27_0 = input.LA(1);

            	        		if ( (LA27_0 == OTHERWISE) )
            	        		{
            	        		    int LA27_1 = input.LA(2);

            	        		    if ( (synpred11_SimSharp()) )
            	        		    {
            	        		        alt27 = 1;
            	        		    }
            	        		}
            	        		switch (alt27) 
            	        		{
            	        		    case 1 :
            	        		        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:324:79: ( otherwiseClause )=> otherwiseClause
            	        		        {
            	        		        	PushFollow(FOLLOW_otherwiseClause_in_connectionStatement1873);
            	        		        	otherwiseClause111 = otherwiseClause();
            	        		        	state.followingStackPointer--;
            	        		        	if (state.failed) return retval;
            	        		        	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, otherwiseClause111.Tree);

            	        		        }
            	        		        break;

            	        		}


            	        	}


            	        }
            	        break;
            	    case 2 :
            	        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:325:7: ( DO connectionBlock2 ( ( otherwiseClause )=> otherwiseClause )? )
            	        {
            	        	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:325:7: ( DO connectionBlock2 ( ( otherwiseClause )=> otherwiseClause )? )
            	        	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:325:9: DO connectionBlock2 ( ( otherwiseClause )=> otherwiseClause )?
            	        	{
            	        		DO112=(IToken)Match(input,DO,FOLLOW_DO_in_connectionStatement1888); if (state.failed) return retval;
            	        		PushFollow(FOLLOW_connectionBlock2_in_connectionStatement1891);
            	        		connectionBlock2113 = connectionBlock2();
            	        		state.followingStackPointer--;
            	        		if (state.failed) return retval;
            	        		if ( state.backtracking == 0 ) adaptor.AddChild(root_0, connectionBlock2113.Tree);
            	        		// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:325:30: ( ( otherwiseClause )=> otherwiseClause )?
            	        		int alt28 = 2;
            	        		int LA28_0 = input.LA(1);

            	        		if ( (LA28_0 == OTHERWISE) )
            	        		{
            	        		    int LA28_1 = input.LA(2);

            	        		    if ( (synpred12_SimSharp()) )
            	        		    {
            	        		        alt28 = 1;
            	        		    }
            	        		}
            	        		switch (alt28) 
            	        		{
            	        		    case 1 :
            	        		        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:325:32: ( otherwiseClause )=> otherwiseClause
            	        		        {
            	        		        	PushFollow(FOLLOW_otherwiseClause_in_connectionStatement1901);
            	        		        	otherwiseClause114 = otherwiseClause();
            	        		        	state.followingStackPointer--;
            	        		        	if (state.failed) return retval;
            	        		        	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, otherwiseClause114.Tree);

            	        		        }
            	        		        break;

            	        		}


            	        	}


            	        }
            	        break;

            	}


            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "connectionStatement"

    public class whenClause_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "whenClause"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:328:1: whenClause : WHEN classIdentifier DO connectionBlock1 ;
    public SimSharpParser.whenClause_return whenClause() // throws RecognitionException [1]
    {   
        SimSharpParser.whenClause_return retval = new SimSharpParser.whenClause_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken WHEN115 = null;
        IToken DO117 = null;
        SimSharpParser.classIdentifier_return classIdentifier116 = default(SimSharpParser.classIdentifier_return);

        SimSharpParser.connectionBlock1_return connectionBlock1118 = default(SimSharpParser.connectionBlock1_return);


        SimSharpTreeNode WHEN115_tree=null;
        SimSharpTreeNode DO117_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:329:2: ( WHEN classIdentifier DO connectionBlock1 )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:329:4: WHEN classIdentifier DO connectionBlock1
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	WHEN115=(IToken)Match(input,WHEN,FOLLOW_WHEN_in_whenClause1920); if (state.failed) return retval;
            	if ( state.backtracking == 0 )
            	{WHEN115_tree = (SimSharpTreeNode)adaptor.Create(WHEN115);
            		root_0 = (SimSharpTreeNode)adaptor.BecomeRoot(WHEN115_tree, root_0);
            	}
            	PushFollow(FOLLOW_classIdentifier_in_whenClause1923);
            	classIdentifier116 = classIdentifier();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, classIdentifier116.Tree);
            	DO117=(IToken)Match(input,DO,FOLLOW_DO_in_whenClause1925); if (state.failed) return retval;
            	PushFollow(FOLLOW_connectionBlock1_in_whenClause1928);
            	connectionBlock1118 = connectionBlock1();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, connectionBlock1118.Tree);

            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "whenClause"

    public class otherwiseClause_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "otherwiseClause"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:332:1: otherwiseClause : OTHERWISE statement ;
    public SimSharpParser.otherwiseClause_return otherwiseClause() // throws RecognitionException [1]
    {   
        SimSharpParser.otherwiseClause_return retval = new SimSharpParser.otherwiseClause_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken OTHERWISE119 = null;
        SimSharpParser.statement_return statement120 = default(SimSharpParser.statement_return);


        SimSharpTreeNode OTHERWISE119_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:333:2: ( OTHERWISE statement )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:333:4: OTHERWISE statement
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	OTHERWISE119=(IToken)Match(input,OTHERWISE,FOLLOW_OTHERWISE_in_otherwiseClause1940); if (state.failed) return retval;
            	if ( state.backtracking == 0 )
            	{OTHERWISE119_tree = (SimSharpTreeNode)adaptor.Create(OTHERWISE119);
            		root_0 = (SimSharpTreeNode)adaptor.BecomeRoot(OTHERWISE119_tree, root_0);
            	}
            	PushFollow(FOLLOW_statement_in_otherwiseClause1943);
            	statement120 = statement();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, statement120.Tree);

            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "otherwiseClause"

    public class connectionBlock1_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "connectionBlock1"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:336:1: connectionBlock1 : statement -> ^( ConnectBlock1 statement ) ;
    public SimSharpParser.connectionBlock1_return connectionBlock1() // throws RecognitionException [1]
    {   
        SimSharpParser.connectionBlock1_return retval = new SimSharpParser.connectionBlock1_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        SimSharpParser.statement_return statement121 = default(SimSharpParser.statement_return);


        RewriteRuleSubtreeStream stream_statement = new RewriteRuleSubtreeStream(adaptor,"rule statement");
        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:337:2: ( statement -> ^( ConnectBlock1 statement ) )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:337:4: statement
            {
            	PushFollow(FOLLOW_statement_in_connectionBlock11954);
            	statement121 = statement();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( (state.backtracking==0) ) stream_statement.Add(statement121.Tree);


            	// AST REWRITE
            	// elements:          statement
            	// token labels:      
            	// rule labels:       retval
            	// token list labels: 
            	// rule list labels:  
            	// wildcard labels: 
            	if ( (state.backtracking==0) ) {
            	retval.Tree = root_0;
            	RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval!=null ? retval.Tree : null);

            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();
            	// 337:14: -> ^( ConnectBlock1 statement )
            	{
            	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:337:17: ^( ConnectBlock1 statement )
            	    {
            	    SimSharpTreeNode root_1 = (SimSharpTreeNode)adaptor.GetNilNode();
            	    root_1 = (SimSharpTreeNode)adaptor.BecomeRoot((SimSharpTreeNode)adaptor.Create(ConnectBlock1, "ConnectBlock1"), root_1);

            	    adaptor.AddChild(root_1, stream_statement.NextTree());

            	    adaptor.AddChild(root_0, root_1);
            	    }

            	}

            	retval.Tree = root_0;retval.Tree = root_0;}
            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "connectionBlock1"

    public class connectionBlock2_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "connectionBlock2"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:340:1: connectionBlock2 : statement -> ^( ConnectBlock2 statement ) ;
    public SimSharpParser.connectionBlock2_return connectionBlock2() // throws RecognitionException [1]
    {   
        SimSharpParser.connectionBlock2_return retval = new SimSharpParser.connectionBlock2_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        SimSharpParser.statement_return statement122 = default(SimSharpParser.statement_return);


        RewriteRuleSubtreeStream stream_statement = new RewriteRuleSubtreeStream(adaptor,"rule statement");
        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:341:2: ( statement -> ^( ConnectBlock2 statement ) )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:341:4: statement
            {
            	PushFollow(FOLLOW_statement_in_connectionBlock21974);
            	statement122 = statement();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( (state.backtracking==0) ) stream_statement.Add(statement122.Tree);


            	// AST REWRITE
            	// elements:          statement
            	// token labels:      
            	// rule labels:       retval
            	// token list labels: 
            	// rule list labels:  
            	// wildcard labels: 
            	if ( (state.backtracking==0) ) {
            	retval.Tree = root_0;
            	RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval!=null ? retval.Tree : null);

            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();
            	// 341:14: -> ^( ConnectBlock2 statement )
            	{
            	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:341:17: ^( ConnectBlock2 statement )
            	    {
            	    SimSharpTreeNode root_1 = (SimSharpTreeNode)adaptor.GetNilNode();
            	    root_1 = (SimSharpTreeNode)adaptor.BecomeRoot((SimSharpTreeNode)adaptor.Create(ConnectBlock2, "ConnectBlock2"), root_1);

            	    adaptor.AddChild(root_1, stream_statement.NextTree());

            	    adaptor.AddChild(root_0, root_1);
            	    }

            	}

            	retval.Tree = root_0;retval.Tree = root_0;}
            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "connectionBlock2"

    public class compoundStatement_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "compoundStatement"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:344:1: compoundStatement : BEGIN compoundTail -> ^( CompoundStatement compoundTail ) ;
    public SimSharpParser.compoundStatement_return compoundStatement() // throws RecognitionException [1]
    {   
        SimSharpParser.compoundStatement_return retval = new SimSharpParser.compoundStatement_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken BEGIN123 = null;
        SimSharpParser.compoundTail_return compoundTail124 = default(SimSharpParser.compoundTail_return);


        SimSharpTreeNode BEGIN123_tree=null;
        RewriteRuleTokenStream stream_BEGIN = new RewriteRuleTokenStream(adaptor,"token BEGIN");
        RewriteRuleSubtreeStream stream_compoundTail = new RewriteRuleSubtreeStream(adaptor,"rule compoundTail");
        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:345:2: ( BEGIN compoundTail -> ^( CompoundStatement compoundTail ) )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:345:4: BEGIN compoundTail
            {
            	BEGIN123=(IToken)Match(input,BEGIN,FOLLOW_BEGIN_in_compoundStatement1994); if (state.failed) return retval; 
            	if ( (state.backtracking==0) ) stream_BEGIN.Add(BEGIN123);

            	PushFollow(FOLLOW_compoundTail_in_compoundStatement1996);
            	compoundTail124 = compoundTail();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( (state.backtracking==0) ) stream_compoundTail.Add(compoundTail124.Tree);


            	// AST REWRITE
            	// elements:          compoundTail
            	// token labels:      
            	// rule labels:       retval
            	// token list labels: 
            	// rule list labels:  
            	// wildcard labels: 
            	if ( (state.backtracking==0) ) {
            	retval.Tree = root_0;
            	RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval!=null ? retval.Tree : null);

            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();
            	// 345:23: -> ^( CompoundStatement compoundTail )
            	{
            	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:345:26: ^( CompoundStatement compoundTail )
            	    {
            	    SimSharpTreeNode root_1 = (SimSharpTreeNode)adaptor.GetNilNode();
            	    root_1 = (SimSharpTreeNode)adaptor.BecomeRoot((SimSharpTreeNode)adaptor.Create(CompoundStatement, "CompoundStatement"), root_1);

            	    adaptor.AddChild(root_1, stream_compoundTail.NextTree());

            	    adaptor.AddChild(root_0, root_1);
            	    }

            	}

            	retval.Tree = root_0;retval.Tree = root_0;}
            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "compoundStatement"

    public class compoundTail_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "compoundTail"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:348:1: compoundTail : statement ( SCOLON statement )* END (~ ( END | ELSE | WHEN | OTHERWISE | SCOLON ) )* ;
    public SimSharpParser.compoundTail_return compoundTail() // throws RecognitionException [1]
    {   
        SimSharpParser.compoundTail_return retval = new SimSharpParser.compoundTail_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken SCOLON126 = null;
        IToken END128 = null;
        IToken set129 = null;
        SimSharpParser.statement_return statement125 = default(SimSharpParser.statement_return);

        SimSharpParser.statement_return statement127 = default(SimSharpParser.statement_return);


        SimSharpTreeNode SCOLON126_tree=null;
        SimSharpTreeNode END128_tree=null;
        SimSharpTreeNode set129_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:349:2: ( statement ( SCOLON statement )* END (~ ( END | ELSE | WHEN | OTHERWISE | SCOLON ) )* )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:349:4: statement ( SCOLON statement )* END (~ ( END | ELSE | WHEN | OTHERWISE | SCOLON ) )*
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	PushFollow(FOLLOW_statement_in_compoundTail2015);
            	statement125 = statement();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, statement125.Tree);
            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:349:14: ( SCOLON statement )*
            	do 
            	{
            	    int alt30 = 2;
            	    int LA30_0 = input.LA(1);

            	    if ( (LA30_0 == SCOLON) )
            	    {
            	        alt30 = 1;
            	    }


            	    switch (alt30) 
            		{
            			case 1 :
            			    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:349:16: SCOLON statement
            			    {
            			    	SCOLON126=(IToken)Match(input,SCOLON,FOLLOW_SCOLON_in_compoundTail2019); if (state.failed) return retval;
            			    	PushFollow(FOLLOW_statement_in_compoundTail2022);
            			    	statement127 = statement();
            			    	state.followingStackPointer--;
            			    	if (state.failed) return retval;
            			    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, statement127.Tree);

            			    }
            			    break;

            			default:
            			    goto loop30;
            	    }
            	} while (true);

            	loop30:
            		;	// Stops C# compiler whining that label 'loop30' has no statements

            	END128=(IToken)Match(input,END,FOLLOW_END_in_compoundTail2027); if (state.failed) return retval;
            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:349:42: (~ ( END | ELSE | WHEN | OTHERWISE | SCOLON ) )*
            	do 
            	{
            	    int alt31 = 2;
            	    int LA31_0 = input.LA(1);

            	    if ( ((LA31_0 >= SimulaSourceModule && LA31_0 <= REFNEQ) || (LA31_0 >= COLON && LA31_0 <= DELAY) || (LA31_0 >= IF && LA31_0 <= INSPECT) || LA31_0 == BEGIN || (LA31_0 >= ARRAY && LA31_0 <= Z)) )
            	    {
            	        alt31 = 1;
            	    }


            	    switch (alt31) 
            		{
            			case 1 :
            			    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:349:43: ~ ( END | ELSE | WHEN | OTHERWISE | SCOLON )
            			    {
            			    	set129 = (IToken)input.LT(1);
            			    	if ( (input.LA(1) >= SimulaSourceModule && input.LA(1) <= REFNEQ) || (input.LA(1) >= COLON && input.LA(1) <= DELAY) || (input.LA(1) >= IF && input.LA(1) <= INSPECT) || input.LA(1) == BEGIN || (input.LA(1) >= ARRAY && input.LA(1) <= Z) ) 
            			    	{
            			    	    input.Consume();
            			    	    state.errorRecovery = false;state.failed = false;
            			    	}
            			    	else 
            			    	{
            			    	    if ( state.backtracking > 0 ) {state.failed = true; return retval;}
            			    	    MismatchedSetException mse = new MismatchedSetException(null,input);
            			    	    throw mse;
            			    	}


            			    }
            			    break;

            			default:
            			    goto loop31;
            	    }
            	} while (true);

            	loop31:
            		;	// Stops C# compiler whining that label 'loop31' has no statements


            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "compoundTail"

    public class block_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "block"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:352:1: block : ( ( BEGIN declaration )=> ( subBlock ) -> ^( Block subBlock ) | compoundStatement );
    public SimSharpParser.block_return block() // throws RecognitionException [1]
    {   
        SimSharpParser.block_return retval = new SimSharpParser.block_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        SimSharpParser.subBlock_return subBlock130 = default(SimSharpParser.subBlock_return);

        SimSharpParser.compoundStatement_return compoundStatement131 = default(SimSharpParser.compoundStatement_return);


        RewriteRuleSubtreeStream stream_subBlock = new RewriteRuleSubtreeStream(adaptor,"rule subBlock");
        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:352:7: ( ( BEGIN declaration )=> ( subBlock ) -> ^( Block subBlock ) | compoundStatement )
            int alt32 = 2;
            int LA32_0 = input.LA(1);

            if ( (LA32_0 == BEGIN) )
            {
                int LA32_1 = input.LA(2);

                if ( (synpred13_SimSharp()) )
                {
                    alt32 = 1;
                }
                else if ( (true) )
                {
                    alt32 = 2;
                }
                else 
                {
                    if ( state.backtracking > 0 ) {state.failed = true; return retval;}
                    NoViableAltException nvae_d32s1 =
                        new NoViableAltException("", 32, 1, input);

                    throw nvae_d32s1;
                }
            }
            else 
            {
                if ( state.backtracking > 0 ) {state.failed = true; return retval;}
                NoViableAltException nvae_d32s0 =
                    new NoViableAltException("", 32, 0, input);

                throw nvae_d32s0;
            }
            switch (alt32) 
            {
                case 1 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:352:9: ( BEGIN declaration )=> ( subBlock )
                    {
                    	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:352:32: ( subBlock )
                    	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:352:33: subBlock
                    	{
                    		PushFollow(FOLLOW_subBlock_in_block2064);
                    		subBlock130 = subBlock();
                    		state.followingStackPointer--;
                    		if (state.failed) return retval;
                    		if ( (state.backtracking==0) ) stream_subBlock.Add(subBlock130.Tree);

                    	}



                    	// AST REWRITE
                    	// elements:          subBlock
                    	// token labels:      
                    	// rule labels:       retval
                    	// token list labels: 
                    	// rule list labels:  
                    	// wildcard labels: 
                    	if ( (state.backtracking==0) ) {
                    	retval.Tree = root_0;
                    	RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval!=null ? retval.Tree : null);

                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();
                    	// 352:43: -> ^( Block subBlock )
                    	{
                    	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:352:46: ^( Block subBlock )
                    	    {
                    	    SimSharpTreeNode root_1 = (SimSharpTreeNode)adaptor.GetNilNode();
                    	    root_1 = (SimSharpTreeNode)adaptor.BecomeRoot((SimSharpTreeNode)adaptor.Create(Block, "Block"), root_1);

                    	    adaptor.AddChild(root_1, stream_subBlock.NextTree());

                    	    adaptor.AddChild(root_0, root_1);
                    	    }

                    	}

                    	retval.Tree = root_0;retval.Tree = root_0;}
                    }
                    break;
                case 2 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:353:4: compoundStatement
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	PushFollow(FOLLOW_compoundStatement_in_block2078);
                    	compoundStatement131 = compoundStatement();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, compoundStatement131.Tree);

                    }
                    break;

            }
            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "block"

    public class subBlock_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "subBlock"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:356:1: subBlock : blockHead SCOLON compoundTail ;
    public SimSharpParser.subBlock_return subBlock() // throws RecognitionException [1]
    {   
        SimSharpParser.subBlock_return retval = new SimSharpParser.subBlock_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken SCOLON133 = null;
        SimSharpParser.blockHead_return blockHead132 = default(SimSharpParser.blockHead_return);

        SimSharpParser.compoundTail_return compoundTail134 = default(SimSharpParser.compoundTail_return);


        SimSharpTreeNode SCOLON133_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:357:2: ( blockHead SCOLON compoundTail )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:357:4: blockHead SCOLON compoundTail
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	PushFollow(FOLLOW_blockHead_in_subBlock2090);
            	blockHead132 = blockHead();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, blockHead132.Tree);
            	SCOLON133=(IToken)Match(input,SCOLON,FOLLOW_SCOLON_in_subBlock2092); if (state.failed) return retval;
            	PushFollow(FOLLOW_compoundTail_in_subBlock2095);
            	compoundTail134 = compoundTail();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, compoundTail134.Tree);

            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "subBlock"

    public class blockHead_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "blockHead"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:360:1: blockHead : BEGIN declaration ( ( SCOLON declaration )=> SCOLON declaration )* ;
    public SimSharpParser.blockHead_return blockHead() // throws RecognitionException [1]
    {   
        SimSharpParser.blockHead_return retval = new SimSharpParser.blockHead_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken BEGIN135 = null;
        IToken SCOLON137 = null;
        SimSharpParser.declaration_return declaration136 = default(SimSharpParser.declaration_return);

        SimSharpParser.declaration_return declaration138 = default(SimSharpParser.declaration_return);


        SimSharpTreeNode BEGIN135_tree=null;
        SimSharpTreeNode SCOLON137_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:361:2: ( BEGIN declaration ( ( SCOLON declaration )=> SCOLON declaration )* )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:361:4: BEGIN declaration ( ( SCOLON declaration )=> SCOLON declaration )*
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	BEGIN135=(IToken)Match(input,BEGIN,FOLLOW_BEGIN_in_blockHead2107); if (state.failed) return retval;
            	PushFollow(FOLLOW_declaration_in_blockHead2110);
            	declaration136 = declaration();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, declaration136.Tree);
            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:361:23: ( ( SCOLON declaration )=> SCOLON declaration )*
            	do 
            	{
            	    int alt33 = 2;
            	    int LA33_0 = input.LA(1);

            	    if ( (LA33_0 == SCOLON) )
            	    {
            	        int LA33_1 = input.LA(2);

            	        if ( (synpred14_SimSharp()) )
            	        {
            	            alt33 = 1;
            	        }


            	    }


            	    switch (alt33) 
            		{
            			case 1 :
            			    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:361:25: ( SCOLON declaration )=> SCOLON declaration
            			    {
            			    	SCOLON137=(IToken)Match(input,SCOLON,FOLLOW_SCOLON_in_blockHead2122); if (state.failed) return retval;
            			    	PushFollow(FOLLOW_declaration_in_blockHead2125);
            			    	declaration138 = declaration();
            			    	state.followingStackPointer--;
            			    	if (state.failed) return retval;
            			    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, declaration138.Tree);

            			    }
            			    break;

            			default:
            			    goto loop33;
            	    }
            	} while (true);

            	loop33:
            		;	// Stops C# compiler whining that label 'loop33' has no statements


            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "blockHead"

    public class prefixedBlock_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "prefixedBlock"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:364:1: prefixedBlock : ID ( actualParameterPart )? block -> ^( PrefixedBlock ID block ^( NEW ( actualParameterPart )? ) ) ;
    public SimSharpParser.prefixedBlock_return prefixedBlock() // throws RecognitionException [1]
    {   
        SimSharpParser.prefixedBlock_return retval = new SimSharpParser.prefixedBlock_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken ID139 = null;
        SimSharpParser.actualParameterPart_return actualParameterPart140 = default(SimSharpParser.actualParameterPart_return);

        SimSharpParser.block_return block141 = default(SimSharpParser.block_return);


        SimSharpTreeNode ID139_tree=null;
        RewriteRuleTokenStream stream_ID = new RewriteRuleTokenStream(adaptor,"token ID");
        RewriteRuleSubtreeStream stream_actualParameterPart = new RewriteRuleSubtreeStream(adaptor,"rule actualParameterPart");
        RewriteRuleSubtreeStream stream_block = new RewriteRuleSubtreeStream(adaptor,"rule block");

        TypeSymbol c = null;
        SimSharpTreeNode prefixBlockName = null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:369:2: ( ID ( actualParameterPart )? block -> ^( PrefixedBlock ID block ^( NEW ( actualParameterPart )? ) ) )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:369:4: ID ( actualParameterPart )? block
            {
            	ID139=(IToken)Match(input,ID,FOLLOW_ID_in_prefixedBlock2147); if (state.failed) return retval; 
            	if ( (state.backtracking==0) ) stream_ID.Add(ID139);

            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:369:8: ( actualParameterPart )?
            	int alt34 = 2;
            	int LA34_0 = input.LA(1);

            	if ( (LA34_0 == LPAR) )
            	{
            	    alt34 = 1;
            	}
            	switch (alt34) 
            	{
            	    case 1 :
            	        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:369:9: actualParameterPart
            	        {
            	        	PushFollow(FOLLOW_actualParameterPart_in_prefixedBlock2151);
            	        	actualParameterPart140 = actualParameterPart();
            	        	state.followingStackPointer--;
            	        	if (state.failed) return retval;
            	        	if ( (state.backtracking==0) ) stream_actualParameterPart.Add(actualParameterPart140.Tree);

            	        }
            	        break;

            	}

            	if ( (state.backtracking==0) )
            	{

            	  		c = ctx.CurrentType.AddPrefixedBlock(null);
            	  		prefixBlockName = new SimSharpTreeNode(new Antlr.Runtime.CommonToken(SimSharpLexer.ID, c.Name));
            	  	  	ctx.Push(c);
            	  		
            	}
            	PushFollow(FOLLOW_block_in_prefixedBlock2161);
            	block141 = block();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( (state.backtracking==0) ) stream_block.Add(block141.Tree);
            	if ( (state.backtracking==0) )
            	{
            	   ctx.Pop(); 
            	}


            	// AST REWRITE
            	// elements:          block, ID, actualParameterPart
            	// token labels:      
            	// rule labels:       retval
            	// token list labels: 
            	// rule list labels:  
            	// wildcard labels: 
            	if ( (state.backtracking==0) ) {
            	retval.Tree = root_0;
            	RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval!=null ? retval.Tree : null);

            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();
            	// 378:3: -> ^( PrefixedBlock ID block ^( NEW ( actualParameterPart )? ) )
            	{
            	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:378:6: ^( PrefixedBlock ID block ^( NEW ( actualParameterPart )? ) )
            	    {
            	    SimSharpTreeNode root_1 = (SimSharpTreeNode)adaptor.GetNilNode();
            	    root_1 = (SimSharpTreeNode)adaptor.BecomeRoot((SimSharpTreeNode)adaptor.Create(PrefixedBlock, "PrefixedBlock"), root_1);

            	    adaptor.AddChild(root_1, stream_ID.NextNode());
            	    adaptor.AddChild(root_1, prefixBlockName);
            	    adaptor.AddChild(root_1, stream_block.NextTree());
            	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:383:4: ^( NEW ( actualParameterPart )? )
            	    {
            	    SimSharpTreeNode root_2 = (SimSharpTreeNode)adaptor.GetNilNode();
            	    root_2 = (SimSharpTreeNode)adaptor.BecomeRoot((SimSharpTreeNode)adaptor.Create(NEW, "NEW"), root_2);

            	    adaptor.AddChild(root_2, prefixBlockName);
            	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:383:28: ( actualParameterPart )?
            	    if ( stream_actualParameterPart.HasNext() )
            	    {
            	        adaptor.AddChild(root_2, stream_actualParameterPart.NextTree());

            	    }
            	    stream_actualParameterPart.Reset();

            	    adaptor.AddChild(root_1, root_2);
            	    }

            	    adaptor.AddChild(root_0, root_1);
            	    }

            	}

            	retval.Tree = root_0;retval.Tree = root_0;}
            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "prefixedBlock"

    public class dummyStatement_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "dummyStatement"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:386:1: dummyStatement : ;
    public SimSharpParser.dummyStatement_return dummyStatement() // throws RecognitionException [1]
    {   
        SimSharpParser.dummyStatement_return retval = new SimSharpParser.dummyStatement_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:387:2: ()
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:388:2: 
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "dummyStatement"

    public class declaration_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "declaration"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:394:1: declaration options {k=5; } : ( simpleVarDeclaration | arrayDeclaration | switchDeclaration | procedureDeclaration | classDeclaration | externalDeclaration );
    public SimSharpParser.declaration_return declaration() // throws RecognitionException [1]
    {   
        SimSharpParser.declaration_return retval = new SimSharpParser.declaration_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        SimSharpParser.simpleVarDeclaration_return simpleVarDeclaration142 = default(SimSharpParser.simpleVarDeclaration_return);

        SimSharpParser.arrayDeclaration_return arrayDeclaration143 = default(SimSharpParser.arrayDeclaration_return);

        SimSharpParser.switchDeclaration_return switchDeclaration144 = default(SimSharpParser.switchDeclaration_return);

        SimSharpParser.procedureDeclaration_return procedureDeclaration145 = default(SimSharpParser.procedureDeclaration_return);

        SimSharpParser.classDeclaration_return classDeclaration146 = default(SimSharpParser.classDeclaration_return);

        SimSharpParser.externalDeclaration_return externalDeclaration147 = default(SimSharpParser.externalDeclaration_return);



        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:396:2: ( simpleVarDeclaration | arrayDeclaration | switchDeclaration | procedureDeclaration | classDeclaration | externalDeclaration )
            int alt35 = 6;
            alt35 = dfa35.Predict(input);
            switch (alt35) 
            {
                case 1 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:396:4: simpleVarDeclaration
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	PushFollow(FOLLOW_simpleVarDeclaration_in_declaration2243);
                    	simpleVarDeclaration142 = simpleVarDeclaration();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, simpleVarDeclaration142.Tree);

                    }
                    break;
                case 2 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:397:4: arrayDeclaration
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	PushFollow(FOLLOW_arrayDeclaration_in_declaration2250);
                    	arrayDeclaration143 = arrayDeclaration();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, arrayDeclaration143.Tree);

                    }
                    break;
                case 3 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:398:4: switchDeclaration
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	PushFollow(FOLLOW_switchDeclaration_in_declaration2256);
                    	switchDeclaration144 = switchDeclaration();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, switchDeclaration144.Tree);

                    }
                    break;
                case 4 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:399:4: procedureDeclaration
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	PushFollow(FOLLOW_procedureDeclaration_in_declaration2262);
                    	procedureDeclaration145 = procedureDeclaration();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, procedureDeclaration145.Tree);

                    }
                    break;
                case 5 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:400:4: classDeclaration
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	PushFollow(FOLLOW_classDeclaration_in_declaration2268);
                    	classDeclaration146 = classDeclaration();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, classDeclaration146.Tree);

                    }
                    break;
                case 6 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:401:4: externalDeclaration
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	PushFollow(FOLLOW_externalDeclaration_in_declaration2274);
                    	externalDeclaration147 = externalDeclaration();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, externalDeclaration147.Tree);

                    }
                    break;

            }
            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "declaration"

    public class simpleVarDeclaration_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "simpleVarDeclaration"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:404:1: simpleVarDeclaration : type typeList -> ^( VarDecl type typeList ) ;
    public SimSharpParser.simpleVarDeclaration_return simpleVarDeclaration() // throws RecognitionException [1]
    {   
        SimSharpParser.simpleVarDeclaration_return retval = new SimSharpParser.simpleVarDeclaration_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        SimSharpParser.type_return type148 = default(SimSharpParser.type_return);

        SimSharpParser.typeList_return typeList149 = default(SimSharpParser.typeList_return);


        RewriteRuleSubtreeStream stream_type = new RewriteRuleSubtreeStream(adaptor,"rule type");
        RewriteRuleSubtreeStream stream_typeList = new RewriteRuleSubtreeStream(adaptor,"rule typeList");
        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:405:2: ( type typeList -> ^( VarDecl type typeList ) )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:405:4: type typeList
            {
            	PushFollow(FOLLOW_type_in_simpleVarDeclaration2286);
            	type148 = type();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( (state.backtracking==0) ) stream_type.Add(type148.Tree);
            	PushFollow(FOLLOW_typeList_in_simpleVarDeclaration2288);
            	typeList149 = typeList();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( (state.backtracking==0) ) stream_typeList.Add(typeList149.Tree);


            	// AST REWRITE
            	// elements:          type, typeList
            	// token labels:      
            	// rule labels:       retval
            	// token list labels: 
            	// rule list labels:  
            	// wildcard labels: 
            	if ( (state.backtracking==0) ) {
            	retval.Tree = root_0;
            	RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval!=null ? retval.Tree : null);

            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();
            	// 405:18: -> ^( VarDecl type typeList )
            	{
            	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:405:21: ^( VarDecl type typeList )
            	    {
            	    SimSharpTreeNode root_1 = (SimSharpTreeNode)adaptor.GetNilNode();
            	    root_1 = (SimSharpTreeNode)adaptor.BecomeRoot((SimSharpTreeNode)adaptor.Create(VarDecl, "VarDecl"), root_1);

            	    adaptor.AddChild(root_1, stream_type.NextTree());
            	    adaptor.AddChild(root_1, stream_typeList.NextTree());

            	    adaptor.AddChild(root_0, root_1);
            	    }

            	}

            	retval.Tree = root_0;retval.Tree = root_0;}
            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "simpleVarDeclaration"

    public class typeList_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "typeList"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:408:1: typeList : typeListElement ( COMMA typeListElement )* -> ^( TypeList ( typeListElement )* ) ;
    public SimSharpParser.typeList_return typeList() // throws RecognitionException [1]
    {   
        SimSharpParser.typeList_return retval = new SimSharpParser.typeList_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken COMMA151 = null;
        SimSharpParser.typeListElement_return typeListElement150 = default(SimSharpParser.typeListElement_return);

        SimSharpParser.typeListElement_return typeListElement152 = default(SimSharpParser.typeListElement_return);


        SimSharpTreeNode COMMA151_tree=null;
        RewriteRuleTokenStream stream_COMMA = new RewriteRuleTokenStream(adaptor,"token COMMA");
        RewriteRuleSubtreeStream stream_typeListElement = new RewriteRuleSubtreeStream(adaptor,"rule typeListElement");
        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:409:2: ( typeListElement ( COMMA typeListElement )* -> ^( TypeList ( typeListElement )* ) )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:409:4: typeListElement ( COMMA typeListElement )*
            {
            	PushFollow(FOLLOW_typeListElement_in_typeList2309);
            	typeListElement150 = typeListElement();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( (state.backtracking==0) ) stream_typeListElement.Add(typeListElement150.Tree);
            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:409:20: ( COMMA typeListElement )*
            	do 
            	{
            	    int alt36 = 2;
            	    int LA36_0 = input.LA(1);

            	    if ( (LA36_0 == COMMA) )
            	    {
            	        alt36 = 1;
            	    }


            	    switch (alt36) 
            		{
            			case 1 :
            			    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:409:22: COMMA typeListElement
            			    {
            			    	COMMA151=(IToken)Match(input,COMMA,FOLLOW_COMMA_in_typeList2313); if (state.failed) return retval; 
            			    	if ( (state.backtracking==0) ) stream_COMMA.Add(COMMA151);

            			    	PushFollow(FOLLOW_typeListElement_in_typeList2315);
            			    	typeListElement152 = typeListElement();
            			    	state.followingStackPointer--;
            			    	if (state.failed) return retval;
            			    	if ( (state.backtracking==0) ) stream_typeListElement.Add(typeListElement152.Tree);

            			    }
            			    break;

            			default:
            			    goto loop36;
            	    }
            	} while (true);

            	loop36:
            		;	// Stops C# compiler whining that label 'loop36' has no statements



            	// AST REWRITE
            	// elements:          typeListElement
            	// token labels:      
            	// rule labels:       retval
            	// token list labels: 
            	// rule list labels:  
            	// wildcard labels: 
            	if ( (state.backtracking==0) ) {
            	retval.Tree = root_0;
            	RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval!=null ? retval.Tree : null);

            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();
            	// 409:47: -> ^( TypeList ( typeListElement )* )
            	{
            	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:409:50: ^( TypeList ( typeListElement )* )
            	    {
            	    SimSharpTreeNode root_1 = (SimSharpTreeNode)adaptor.GetNilNode();
            	    root_1 = (SimSharpTreeNode)adaptor.BecomeRoot((SimSharpTreeNode)adaptor.Create(TypeList, "TypeList"), root_1);

            	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:409:61: ( typeListElement )*
            	    while ( stream_typeListElement.HasNext() )
            	    {
            	        adaptor.AddChild(root_1, stream_typeListElement.NextTree());

            	    }
            	    stream_typeListElement.Reset();

            	    adaptor.AddChild(root_0, root_1);
            	    }

            	}

            	retval.Tree = root_0;retval.Tree = root_0;}
            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "typeList"

    public class typeListElement_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "typeListElement"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:412:1: typeListElement : ( ( ID EQ )=> constantElement | ID );
    public SimSharpParser.typeListElement_return typeListElement() // throws RecognitionException [1]
    {   
        SimSharpParser.typeListElement_return retval = new SimSharpParser.typeListElement_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken ID154 = null;
        SimSharpParser.constantElement_return constantElement153 = default(SimSharpParser.constantElement_return);


        SimSharpTreeNode ID154_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:413:2: ( ( ID EQ )=> constantElement | ID )
            int alt37 = 2;
            int LA37_0 = input.LA(1);

            if ( (LA37_0 == ID) )
            {
                int LA37_1 = input.LA(2);

                if ( (synpred15_SimSharp()) )
                {
                    alt37 = 1;
                }
                else if ( (true) )
                {
                    alt37 = 2;
                }
                else 
                {
                    if ( state.backtracking > 0 ) {state.failed = true; return retval;}
                    NoViableAltException nvae_d37s1 =
                        new NoViableAltException("", 37, 1, input);

                    throw nvae_d37s1;
                }
            }
            else 
            {
                if ( state.backtracking > 0 ) {state.failed = true; return retval;}
                NoViableAltException nvae_d37s0 =
                    new NoViableAltException("", 37, 0, input);

                throw nvae_d37s0;
            }
            switch (alt37) 
            {
                case 1 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:413:4: ( ID EQ )=> constantElement
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	PushFollow(FOLLOW_constantElement_in_typeListElement2346);
                    	constantElement153 = constantElement();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, constantElement153.Tree);

                    }
                    break;
                case 2 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:414:4: ID
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	ID154=(IToken)Match(input,ID,FOLLOW_ID_in_typeListElement2352); if (state.failed) return retval;
                    	if ( state.backtracking == 0 )
                    	{ID154_tree = (SimSharpTreeNode)adaptor.Create(ID154);
                    		adaptor.AddChild(root_0, ID154_tree);
                    	}

                    }
                    break;

            }
            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "typeListElement"

    public class arrayDeclaration_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "arrayDeclaration"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:417:1: arrayDeclaration : ( type )? ARRAY arraySegment ( COMMA arraySegment )* -> ^( ArrayDecl ( type )? arraySegment ( arraySegment )* ) ;
    public SimSharpParser.arrayDeclaration_return arrayDeclaration() // throws RecognitionException [1]
    {   
        SimSharpParser.arrayDeclaration_return retval = new SimSharpParser.arrayDeclaration_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken ARRAY156 = null;
        IToken COMMA158 = null;
        SimSharpParser.type_return type155 = default(SimSharpParser.type_return);

        SimSharpParser.arraySegment_return arraySegment157 = default(SimSharpParser.arraySegment_return);

        SimSharpParser.arraySegment_return arraySegment159 = default(SimSharpParser.arraySegment_return);


        SimSharpTreeNode ARRAY156_tree=null;
        SimSharpTreeNode COMMA158_tree=null;
        RewriteRuleTokenStream stream_COMMA = new RewriteRuleTokenStream(adaptor,"token COMMA");
        RewriteRuleTokenStream stream_ARRAY = new RewriteRuleTokenStream(adaptor,"token ARRAY");
        RewriteRuleSubtreeStream stream_type = new RewriteRuleSubtreeStream(adaptor,"rule type");
        RewriteRuleSubtreeStream stream_arraySegment = new RewriteRuleSubtreeStream(adaptor,"rule arraySegment");
        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:418:2: ( ( type )? ARRAY arraySegment ( COMMA arraySegment )* -> ^( ArrayDecl ( type )? arraySegment ( arraySegment )* ) )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:418:4: ( type )? ARRAY arraySegment ( COMMA arraySegment )*
            {
            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:418:4: ( type )?
            	int alt38 = 2;
            	int LA38_0 = input.LA(1);

            	if ( ((LA38_0 >= BOOLEAN && LA38_0 <= REF)) )
            	{
            	    alt38 = 1;
            	}
            	switch (alt38) 
            	{
            	    case 1 :
            	        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:418:6: type
            	        {
            	        	PushFollow(FOLLOW_type_in_arrayDeclaration2365);
            	        	type155 = type();
            	        	state.followingStackPointer--;
            	        	if (state.failed) return retval;
            	        	if ( (state.backtracking==0) ) stream_type.Add(type155.Tree);

            	        }
            	        break;

            	}

            	ARRAY156=(IToken)Match(input,ARRAY,FOLLOW_ARRAY_in_arrayDeclaration2370); if (state.failed) return retval; 
            	if ( (state.backtracking==0) ) stream_ARRAY.Add(ARRAY156);

            	PushFollow(FOLLOW_arraySegment_in_arrayDeclaration2372);
            	arraySegment157 = arraySegment();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( (state.backtracking==0) ) stream_arraySegment.Add(arraySegment157.Tree);
            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:418:33: ( COMMA arraySegment )*
            	do 
            	{
            	    int alt39 = 2;
            	    int LA39_0 = input.LA(1);

            	    if ( (LA39_0 == COMMA) )
            	    {
            	        alt39 = 1;
            	    }


            	    switch (alt39) 
            		{
            			case 1 :
            			    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:418:35: COMMA arraySegment
            			    {
            			    	COMMA158=(IToken)Match(input,COMMA,FOLLOW_COMMA_in_arrayDeclaration2376); if (state.failed) return retval; 
            			    	if ( (state.backtracking==0) ) stream_COMMA.Add(COMMA158);

            			    	PushFollow(FOLLOW_arraySegment_in_arrayDeclaration2378);
            			    	arraySegment159 = arraySegment();
            			    	state.followingStackPointer--;
            			    	if (state.failed) return retval;
            			    	if ( (state.backtracking==0) ) stream_arraySegment.Add(arraySegment159.Tree);

            			    }
            			    break;

            			default:
            			    goto loop39;
            	    }
            	} while (true);

            	loop39:
            		;	// Stops C# compiler whining that label 'loop39' has no statements



            	// AST REWRITE
            	// elements:          type, arraySegment, arraySegment
            	// token labels:      
            	// rule labels:       retval
            	// token list labels: 
            	// rule list labels:  
            	// wildcard labels: 
            	if ( (state.backtracking==0) ) {
            	retval.Tree = root_0;
            	RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval!=null ? retval.Tree : null);

            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();
            	// 418:57: -> ^( ArrayDecl ( type )? arraySegment ( arraySegment )* )
            	{
            	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:418:60: ^( ArrayDecl ( type )? arraySegment ( arraySegment )* )
            	    {
            	    SimSharpTreeNode root_1 = (SimSharpTreeNode)adaptor.GetNilNode();
            	    root_1 = (SimSharpTreeNode)adaptor.BecomeRoot((SimSharpTreeNode)adaptor.Create(ArrayDecl, "ArrayDecl"), root_1);

            	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:418:72: ( type )?
            	    if ( stream_type.HasNext() )
            	    {
            	        adaptor.AddChild(root_1, stream_type.NextTree());

            	    }
            	    stream_type.Reset();
            	    adaptor.AddChild(root_1, stream_arraySegment.NextTree());
            	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:418:93: ( arraySegment )*
            	    while ( stream_arraySegment.HasNext() )
            	    {
            	        adaptor.AddChild(root_1, stream_arraySegment.NextTree());

            	    }
            	    stream_arraySegment.Reset();

            	    adaptor.AddChild(root_0, root_1);
            	    }

            	}

            	retval.Tree = root_0;retval.Tree = root_0;}
            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "arrayDeclaration"

    public class arraySegment_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "arraySegment"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:421:1: arraySegment : arrayIdentifier ( COMMA arrayIdentifier )* LPAR boundPairList RPAR -> ^( Array arrayIdentifier ( arrayIdentifier )* boundPairList ) ;
    public SimSharpParser.arraySegment_return arraySegment() // throws RecognitionException [1]
    {   
        SimSharpParser.arraySegment_return retval = new SimSharpParser.arraySegment_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken COMMA161 = null;
        IToken LPAR163 = null;
        IToken RPAR165 = null;
        SimSharpParser.arrayIdentifier_return arrayIdentifier160 = default(SimSharpParser.arrayIdentifier_return);

        SimSharpParser.arrayIdentifier_return arrayIdentifier162 = default(SimSharpParser.arrayIdentifier_return);

        SimSharpParser.boundPairList_return boundPairList164 = default(SimSharpParser.boundPairList_return);


        SimSharpTreeNode COMMA161_tree=null;
        SimSharpTreeNode LPAR163_tree=null;
        SimSharpTreeNode RPAR165_tree=null;
        RewriteRuleTokenStream stream_RPAR = new RewriteRuleTokenStream(adaptor,"token RPAR");
        RewriteRuleTokenStream stream_LPAR = new RewriteRuleTokenStream(adaptor,"token LPAR");
        RewriteRuleTokenStream stream_COMMA = new RewriteRuleTokenStream(adaptor,"token COMMA");
        RewriteRuleSubtreeStream stream_arrayIdentifier = new RewriteRuleSubtreeStream(adaptor,"rule arrayIdentifier");
        RewriteRuleSubtreeStream stream_boundPairList = new RewriteRuleSubtreeStream(adaptor,"rule boundPairList");
        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:422:2: ( arrayIdentifier ( COMMA arrayIdentifier )* LPAR boundPairList RPAR -> ^( Array arrayIdentifier ( arrayIdentifier )* boundPairList ) )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:422:4: arrayIdentifier ( COMMA arrayIdentifier )* LPAR boundPairList RPAR
            {
            	PushFollow(FOLLOW_arrayIdentifier_in_arraySegment2410);
            	arrayIdentifier160 = arrayIdentifier();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( (state.backtracking==0) ) stream_arrayIdentifier.Add(arrayIdentifier160.Tree);
            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:422:20: ( COMMA arrayIdentifier )*
            	do 
            	{
            	    int alt40 = 2;
            	    int LA40_0 = input.LA(1);

            	    if ( (LA40_0 == COMMA) )
            	    {
            	        alt40 = 1;
            	    }


            	    switch (alt40) 
            		{
            			case 1 :
            			    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:422:22: COMMA arrayIdentifier
            			    {
            			    	COMMA161=(IToken)Match(input,COMMA,FOLLOW_COMMA_in_arraySegment2414); if (state.failed) return retval; 
            			    	if ( (state.backtracking==0) ) stream_COMMA.Add(COMMA161);

            			    	PushFollow(FOLLOW_arrayIdentifier_in_arraySegment2416);
            			    	arrayIdentifier162 = arrayIdentifier();
            			    	state.followingStackPointer--;
            			    	if (state.failed) return retval;
            			    	if ( (state.backtracking==0) ) stream_arrayIdentifier.Add(arrayIdentifier162.Tree);

            			    }
            			    break;

            			default:
            			    goto loop40;
            	    }
            	} while (true);

            	loop40:
            		;	// Stops C# compiler whining that label 'loop40' has no statements

            	LPAR163=(IToken)Match(input,LPAR,FOLLOW_LPAR_in_arraySegment2421); if (state.failed) return retval; 
            	if ( (state.backtracking==0) ) stream_LPAR.Add(LPAR163);

            	PushFollow(FOLLOW_boundPairList_in_arraySegment2423);
            	boundPairList164 = boundPairList();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( (state.backtracking==0) ) stream_boundPairList.Add(boundPairList164.Tree);
            	RPAR165=(IToken)Match(input,RPAR,FOLLOW_RPAR_in_arraySegment2425); if (state.failed) return retval; 
            	if ( (state.backtracking==0) ) stream_RPAR.Add(RPAR165);



            	// AST REWRITE
            	// elements:          boundPairList, arrayIdentifier, arrayIdentifier
            	// token labels:      
            	// rule labels:       retval
            	// token list labels: 
            	// rule list labels:  
            	// wildcard labels: 
            	if ( (state.backtracking==0) ) {
            	retval.Tree = root_0;
            	RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval!=null ? retval.Tree : null);

            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();
            	// 422:71: -> ^( Array arrayIdentifier ( arrayIdentifier )* boundPairList )
            	{
            	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:422:74: ^( Array arrayIdentifier ( arrayIdentifier )* boundPairList )
            	    {
            	    SimSharpTreeNode root_1 = (SimSharpTreeNode)adaptor.GetNilNode();
            	    root_1 = (SimSharpTreeNode)adaptor.BecomeRoot((SimSharpTreeNode)adaptor.Create(Array, "Array"), root_1);

            	    adaptor.AddChild(root_1, stream_arrayIdentifier.NextTree());
            	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:422:98: ( arrayIdentifier )*
            	    while ( stream_arrayIdentifier.HasNext() )
            	    {
            	        adaptor.AddChild(root_1, stream_arrayIdentifier.NextTree());

            	    }
            	    stream_arrayIdentifier.Reset();
            	    adaptor.AddChild(root_1, stream_boundPairList.NextTree());

            	    adaptor.AddChild(root_0, root_1);
            	    }

            	}

            	retval.Tree = root_0;retval.Tree = root_0;}
            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "arraySegment"

    public class arrayIdentifier_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "arrayIdentifier"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:425:1: arrayIdentifier : ID ;
    public SimSharpParser.arrayIdentifier_return arrayIdentifier() // throws RecognitionException [1]
    {   
        SimSharpParser.arrayIdentifier_return retval = new SimSharpParser.arrayIdentifier_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken ID166 = null;

        SimSharpTreeNode ID166_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:426:2: ( ID )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:426:4: ID
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	ID166=(IToken)Match(input,ID,FOLLOW_ID_in_arrayIdentifier2451); if (state.failed) return retval;
            	if ( state.backtracking == 0 )
            	{ID166_tree = (SimSharpTreeNode)adaptor.Create(ID166);
            		adaptor.AddChild(root_0, ID166_tree);
            	}

            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "arrayIdentifier"

    public class boundPairList_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "boundPairList"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:429:1: boundPairList : boundPair ( COMMA boundPair )* ;
    public SimSharpParser.boundPairList_return boundPairList() // throws RecognitionException [1]
    {   
        SimSharpParser.boundPairList_return retval = new SimSharpParser.boundPairList_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken COMMA168 = null;
        SimSharpParser.boundPair_return boundPair167 = default(SimSharpParser.boundPair_return);

        SimSharpParser.boundPair_return boundPair169 = default(SimSharpParser.boundPair_return);


        SimSharpTreeNode COMMA168_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:430:2: ( boundPair ( COMMA boundPair )* )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:430:4: boundPair ( COMMA boundPair )*
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	PushFollow(FOLLOW_boundPair_in_boundPairList2462);
            	boundPair167 = boundPair();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, boundPair167.Tree);
            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:430:14: ( COMMA boundPair )*
            	do 
            	{
            	    int alt41 = 2;
            	    int LA41_0 = input.LA(1);

            	    if ( (LA41_0 == COMMA) )
            	    {
            	        alt41 = 1;
            	    }


            	    switch (alt41) 
            		{
            			case 1 :
            			    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:430:16: COMMA boundPair
            			    {
            			    	COMMA168=(IToken)Match(input,COMMA,FOLLOW_COMMA_in_boundPairList2466); if (state.failed) return retval;
            			    	PushFollow(FOLLOW_boundPair_in_boundPairList2469);
            			    	boundPair169 = boundPair();
            			    	state.followingStackPointer--;
            			    	if (state.failed) return retval;
            			    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, boundPair169.Tree);

            			    }
            			    break;

            			default:
            			    goto loop41;
            	    }
            	} while (true);

            	loop41:
            		;	// Stops C# compiler whining that label 'loop41' has no statements


            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "boundPairList"

    public class boundPair_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "boundPair"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:433:1: boundPair : arithmeticExpression COLON arithmeticExpression -> ^( ArrayDim arithmeticExpression arithmeticExpression ) ;
    public SimSharpParser.boundPair_return boundPair() // throws RecognitionException [1]
    {   
        SimSharpParser.boundPair_return retval = new SimSharpParser.boundPair_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken COLON171 = null;
        SimSharpParser.arithmeticExpression_return arithmeticExpression170 = default(SimSharpParser.arithmeticExpression_return);

        SimSharpParser.arithmeticExpression_return arithmeticExpression172 = default(SimSharpParser.arithmeticExpression_return);


        SimSharpTreeNode COLON171_tree=null;
        RewriteRuleTokenStream stream_COLON = new RewriteRuleTokenStream(adaptor,"token COLON");
        RewriteRuleSubtreeStream stream_arithmeticExpression = new RewriteRuleSubtreeStream(adaptor,"rule arithmeticExpression");
        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:434:2: ( arithmeticExpression COLON arithmeticExpression -> ^( ArrayDim arithmeticExpression arithmeticExpression ) )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:434:5: arithmeticExpression COLON arithmeticExpression
            {
            	PushFollow(FOLLOW_arithmeticExpression_in_boundPair2485);
            	arithmeticExpression170 = arithmeticExpression();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( (state.backtracking==0) ) stream_arithmeticExpression.Add(arithmeticExpression170.Tree);
            	COLON171=(IToken)Match(input,COLON,FOLLOW_COLON_in_boundPair2487); if (state.failed) return retval; 
            	if ( (state.backtracking==0) ) stream_COLON.Add(COLON171);

            	PushFollow(FOLLOW_arithmeticExpression_in_boundPair2489);
            	arithmeticExpression172 = arithmeticExpression();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( (state.backtracking==0) ) stream_arithmeticExpression.Add(arithmeticExpression172.Tree);


            	// AST REWRITE
            	// elements:          arithmeticExpression, arithmeticExpression
            	// token labels:      
            	// rule labels:       retval
            	// token list labels: 
            	// rule list labels:  
            	// wildcard labels: 
            	if ( (state.backtracking==0) ) {
            	retval.Tree = root_0;
            	RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval!=null ? retval.Tree : null);

            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();
            	// 434:53: -> ^( ArrayDim arithmeticExpression arithmeticExpression )
            	{
            	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:434:56: ^( ArrayDim arithmeticExpression arithmeticExpression )
            	    {
            	    SimSharpTreeNode root_1 = (SimSharpTreeNode)adaptor.GetNilNode();
            	    root_1 = (SimSharpTreeNode)adaptor.BecomeRoot((SimSharpTreeNode)adaptor.Create(ArrayDim, "ArrayDim"), root_1);

            	    adaptor.AddChild(root_1, stream_arithmeticExpression.NextTree());
            	    adaptor.AddChild(root_1, stream_arithmeticExpression.NextTree());

            	    adaptor.AddChild(root_0, root_1);
            	    }

            	}

            	retval.Tree = root_0;retval.Tree = root_0;}
            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "boundPair"

    public class switchDeclaration_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "switchDeclaration"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:437:1: switchDeclaration : SWITCH switchIdentifier VALASSIGN switchList ;
    public SimSharpParser.switchDeclaration_return switchDeclaration() // throws RecognitionException [1]
    {   
        SimSharpParser.switchDeclaration_return retval = new SimSharpParser.switchDeclaration_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken SWITCH173 = null;
        IToken VALASSIGN175 = null;
        SimSharpParser.switchIdentifier_return switchIdentifier174 = default(SimSharpParser.switchIdentifier_return);

        SimSharpParser.switchList_return switchList176 = default(SimSharpParser.switchList_return);


        SimSharpTreeNode SWITCH173_tree=null;
        SimSharpTreeNode VALASSIGN175_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:438:2: ( SWITCH switchIdentifier VALASSIGN switchList )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:438:4: SWITCH switchIdentifier VALASSIGN switchList
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	SWITCH173=(IToken)Match(input,SWITCH,FOLLOW_SWITCH_in_switchDeclaration2510); if (state.failed) return retval;
            	if ( state.backtracking == 0 )
            	{SWITCH173_tree = (SimSharpTreeNode)adaptor.Create(SWITCH173);
            		root_0 = (SimSharpTreeNode)adaptor.BecomeRoot(SWITCH173_tree, root_0);
            	}
            	PushFollow(FOLLOW_switchIdentifier_in_switchDeclaration2513);
            	switchIdentifier174 = switchIdentifier();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, switchIdentifier174.Tree);
            	VALASSIGN175=(IToken)Match(input,VALASSIGN,FOLLOW_VALASSIGN_in_switchDeclaration2515); if (state.failed) return retval;
            	PushFollow(FOLLOW_switchList_in_switchDeclaration2518);
            	switchList176 = switchList();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, switchList176.Tree);

            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "switchDeclaration"

    public class switchList_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "switchList"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:441:1: switchList : ID ( COMMA ID )* -> ^( SwitchList ( ID )* ) ;
    public SimSharpParser.switchList_return switchList() // throws RecognitionException [1]
    {   
        SimSharpParser.switchList_return retval = new SimSharpParser.switchList_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken ID177 = null;
        IToken COMMA178 = null;
        IToken ID179 = null;

        SimSharpTreeNode ID177_tree=null;
        SimSharpTreeNode COMMA178_tree=null;
        SimSharpTreeNode ID179_tree=null;
        RewriteRuleTokenStream stream_ID = new RewriteRuleTokenStream(adaptor,"token ID");
        RewriteRuleTokenStream stream_COMMA = new RewriteRuleTokenStream(adaptor,"token COMMA");

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:442:2: ( ID ( COMMA ID )* -> ^( SwitchList ( ID )* ) )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:442:4: ID ( COMMA ID )*
            {
            	ID177=(IToken)Match(input,ID,FOLLOW_ID_in_switchList2529); if (state.failed) return retval; 
            	if ( (state.backtracking==0) ) stream_ID.Add(ID177);

            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:442:7: ( COMMA ID )*
            	do 
            	{
            	    int alt42 = 2;
            	    int LA42_0 = input.LA(1);

            	    if ( (LA42_0 == COMMA) )
            	    {
            	        alt42 = 1;
            	    }


            	    switch (alt42) 
            		{
            			case 1 :
            			    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:442:9: COMMA ID
            			    {
            			    	COMMA178=(IToken)Match(input,COMMA,FOLLOW_COMMA_in_switchList2533); if (state.failed) return retval; 
            			    	if ( (state.backtracking==0) ) stream_COMMA.Add(COMMA178);

            			    	ID179=(IToken)Match(input,ID,FOLLOW_ID_in_switchList2535); if (state.failed) return retval; 
            			    	if ( (state.backtracking==0) ) stream_ID.Add(ID179);


            			    }
            			    break;

            			default:
            			    goto loop42;
            	    }
            	} while (true);

            	loop42:
            		;	// Stops C# compiler whining that label 'loop42' has no statements



            	// AST REWRITE
            	// elements:          ID
            	// token labels:      
            	// rule labels:       retval
            	// token list labels: 
            	// rule list labels:  
            	// wildcard labels: 
            	if ( (state.backtracking==0) ) {
            	retval.Tree = root_0;
            	RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval!=null ? retval.Tree : null);

            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();
            	// 442:21: -> ^( SwitchList ( ID )* )
            	{
            	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:442:24: ^( SwitchList ( ID )* )
            	    {
            	    SimSharpTreeNode root_1 = (SimSharpTreeNode)adaptor.GetNilNode();
            	    root_1 = (SimSharpTreeNode)adaptor.BecomeRoot((SimSharpTreeNode)adaptor.Create(SwitchList, "SwitchList"), root_1);

            	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:442:37: ( ID )*
            	    while ( stream_ID.HasNext() )
            	    {
            	        adaptor.AddChild(root_1, stream_ID.NextNode());

            	    }
            	    stream_ID.Reset();

            	    adaptor.AddChild(root_0, root_1);
            	    }

            	}

            	retval.Tree = root_0;retval.Tree = root_0;}
            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "switchList"

    public class procedureDeclaration_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "procedureDeclaration"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:445:1: procedureDeclaration : ( type )? PROCEDURE procedureHeading SCOLON procedureBody -> ^( ProcDecl ( type )? procedureHeading procedureBody ) ;
    public SimSharpParser.procedureDeclaration_return procedureDeclaration() // throws RecognitionException [1]
    {   
        SimSharpParser.procedureDeclaration_return retval = new SimSharpParser.procedureDeclaration_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken PROCEDURE181 = null;
        IToken SCOLON183 = null;
        SimSharpParser.type_return type180 = default(SimSharpParser.type_return);

        SimSharpParser.procedureHeading_return procedureHeading182 = default(SimSharpParser.procedureHeading_return);

        SimSharpParser.procedureBody_return procedureBody184 = default(SimSharpParser.procedureBody_return);


        SimSharpTreeNode PROCEDURE181_tree=null;
        SimSharpTreeNode SCOLON183_tree=null;
        RewriteRuleTokenStream stream_PROCEDURE = new RewriteRuleTokenStream(adaptor,"token PROCEDURE");
        RewriteRuleTokenStream stream_SCOLON = new RewriteRuleTokenStream(adaptor,"token SCOLON");
        RewriteRuleSubtreeStream stream_procedureBody = new RewriteRuleSubtreeStream(adaptor,"rule procedureBody");
        RewriteRuleSubtreeStream stream_type = new RewriteRuleSubtreeStream(adaptor,"rule type");
        RewriteRuleSubtreeStream stream_procedureHeading = new RewriteRuleSubtreeStream(adaptor,"rule procedureHeading");
        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:446:2: ( ( type )? PROCEDURE procedureHeading SCOLON procedureBody -> ^( ProcDecl ( type )? procedureHeading procedureBody ) )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:446:4: ( type )? PROCEDURE procedureHeading SCOLON procedureBody
            {
            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:446:4: ( type )?
            	int alt43 = 2;
            	int LA43_0 = input.LA(1);

            	if ( ((LA43_0 >= BOOLEAN && LA43_0 <= REF)) )
            	{
            	    alt43 = 1;
            	}
            	switch (alt43) 
            	{
            	    case 1 :
            	        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:446:5: type
            	        {
            	        	PushFollow(FOLLOW_type_in_procedureDeclaration2559);
            	        	type180 = type();
            	        	state.followingStackPointer--;
            	        	if (state.failed) return retval;
            	        	if ( (state.backtracking==0) ) stream_type.Add(type180.Tree);

            	        }
            	        break;

            	}

            	PROCEDURE181=(IToken)Match(input,PROCEDURE,FOLLOW_PROCEDURE_in_procedureDeclaration2563); if (state.failed) return retval; 
            	if ( (state.backtracking==0) ) stream_PROCEDURE.Add(PROCEDURE181);

            	PushFollow(FOLLOW_procedureHeading_in_procedureDeclaration2565);
            	procedureHeading182 = procedureHeading();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( (state.backtracking==0) ) stream_procedureHeading.Add(procedureHeading182.Tree);
            	SCOLON183=(IToken)Match(input,SCOLON,FOLLOW_SCOLON_in_procedureDeclaration2567); if (state.failed) return retval; 
            	if ( (state.backtracking==0) ) stream_SCOLON.Add(SCOLON183);

            	PushFollow(FOLLOW_procedureBody_in_procedureDeclaration2569);
            	procedureBody184 = procedureBody();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( (state.backtracking==0) ) stream_procedureBody.Add(procedureBody184.Tree);


            	// AST REWRITE
            	// elements:          type, procedureBody, procedureHeading
            	// token labels:      
            	// rule labels:       retval
            	// token list labels: 
            	// rule list labels:  
            	// wildcard labels: 
            	if ( (state.backtracking==0) ) {
            	retval.Tree = root_0;
            	RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval!=null ? retval.Tree : null);

            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();
            	// 446:60: -> ^( ProcDecl ( type )? procedureHeading procedureBody )
            	{
            	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:446:63: ^( ProcDecl ( type )? procedureHeading procedureBody )
            	    {
            	    SimSharpTreeNode root_1 = (SimSharpTreeNode)adaptor.GetNilNode();
            	    root_1 = (SimSharpTreeNode)adaptor.BecomeRoot((SimSharpTreeNode)adaptor.Create(ProcDecl, "ProcDecl"), root_1);

            	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:446:74: ( type )?
            	    if ( stream_type.HasNext() )
            	    {
            	        adaptor.AddChild(root_1, stream_type.NextTree());

            	    }
            	    stream_type.Reset();
            	    adaptor.AddChild(root_1, stream_procedureHeading.NextTree());
            	    adaptor.AddChild(root_1, stream_procedureBody.NextTree());

            	    adaptor.AddChild(root_0, root_1);
            	    }

            	}

            	retval.Tree = root_0;retval.Tree = root_0;}
            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "procedureDeclaration"

    public class procedureHeading_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "procedureHeading"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:449:1: procedureHeading : procedureIdentifier ( formalParameterPart SCOLON ( modePart )? specificationPart )? ;
    public SimSharpParser.procedureHeading_return procedureHeading() // throws RecognitionException [1]
    {   
        SimSharpParser.procedureHeading_return retval = new SimSharpParser.procedureHeading_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken SCOLON187 = null;
        SimSharpParser.procedureIdentifier_return procedureIdentifier185 = default(SimSharpParser.procedureIdentifier_return);

        SimSharpParser.formalParameterPart_return formalParameterPart186 = default(SimSharpParser.formalParameterPart_return);

        SimSharpParser.modePart_return modePart188 = default(SimSharpParser.modePart_return);

        SimSharpParser.specificationPart_return specificationPart189 = default(SimSharpParser.specificationPart_return);


        SimSharpTreeNode SCOLON187_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:450:2: ( procedureIdentifier ( formalParameterPart SCOLON ( modePart )? specificationPart )? )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:450:4: procedureIdentifier ( formalParameterPart SCOLON ( modePart )? specificationPart )?
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	PushFollow(FOLLOW_procedureIdentifier_in_procedureHeading2595);
            	procedureIdentifier185 = procedureIdentifier();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, procedureIdentifier185.Tree);
            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:451:4: ( formalParameterPart SCOLON ( modePart )? specificationPart )?
            	int alt45 = 2;
            	int LA45_0 = input.LA(1);

            	if ( (LA45_0 == LPAR) )
            	{
            	    alt45 = 1;
            	}
            	switch (alt45) 
            	{
            	    case 1 :
            	        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:451:5: formalParameterPart SCOLON ( modePart )? specificationPart
            	        {
            	        	PushFollow(FOLLOW_formalParameterPart_in_procedureHeading2602);
            	        	formalParameterPart186 = formalParameterPart();
            	        	state.followingStackPointer--;
            	        	if (state.failed) return retval;
            	        	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, formalParameterPart186.Tree);
            	        	SCOLON187=(IToken)Match(input,SCOLON,FOLLOW_SCOLON_in_procedureHeading2604); if (state.failed) return retval;
            	        	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:451:33: ( modePart )?
            	        	int alt44 = 2;
            	        	int LA44_0 = input.LA(1);

            	        	if ( ((LA44_0 >= NAME && LA44_0 <= VALUE)) )
            	        	{
            	        	    alt44 = 1;
            	        	}
            	        	switch (alt44) 
            	        	{
            	        	    case 1 :
            	        	        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:451:34: modePart
            	        	        {
            	        	        	PushFollow(FOLLOW_modePart_in_procedureHeading2608);
            	        	        	modePart188 = modePart();
            	        	        	state.followingStackPointer--;
            	        	        	if (state.failed) return retval;
            	        	        	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, modePart188.Tree);

            	        	        }
            	        	        break;

            	        	}

            	        	PushFollow(FOLLOW_specificationPart_in_procedureHeading2612);
            	        	specificationPart189 = specificationPart();
            	        	state.followingStackPointer--;
            	        	if (state.failed) return retval;
            	        	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, specificationPart189.Tree);

            	        }
            	        break;

            	}


            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "procedureHeading"

    public class procedureBody_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "procedureBody"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:454:1: procedureBody : statement -> ^( ProcBody statement ) ;
    public SimSharpParser.procedureBody_return procedureBody() // throws RecognitionException [1]
    {   
        SimSharpParser.procedureBody_return retval = new SimSharpParser.procedureBody_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        SimSharpParser.statement_return statement190 = default(SimSharpParser.statement_return);


        RewriteRuleSubtreeStream stream_statement = new RewriteRuleSubtreeStream(adaptor,"rule statement");
        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:455:2: ( statement -> ^( ProcBody statement ) )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:455:4: statement
            {
            	PushFollow(FOLLOW_statement_in_procedureBody2626);
            	statement190 = statement();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( (state.backtracking==0) ) stream_statement.Add(statement190.Tree);


            	// AST REWRITE
            	// elements:          statement
            	// token labels:      
            	// rule labels:       retval
            	// token list labels: 
            	// rule list labels:  
            	// wildcard labels: 
            	if ( (state.backtracking==0) ) {
            	retval.Tree = root_0;
            	RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval!=null ? retval.Tree : null);

            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();
            	// 455:14: -> ^( ProcBody statement )
            	{
            	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:455:17: ^( ProcBody statement )
            	    {
            	    SimSharpTreeNode root_1 = (SimSharpTreeNode)adaptor.GetNilNode();
            	    root_1 = (SimSharpTreeNode)adaptor.BecomeRoot((SimSharpTreeNode)adaptor.Create(ProcBody, "ProcBody"), root_1);

            	    adaptor.AddChild(root_1, stream_statement.NextTree());

            	    adaptor.AddChild(root_0, root_1);
            	    }

            	}

            	retval.Tree = root_0;retval.Tree = root_0;}
            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "procedureBody"

    public class procedureIdentifier_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "procedureIdentifier"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:458:1: procedureIdentifier : ID ;
    public SimSharpParser.procedureIdentifier_return procedureIdentifier() // throws RecognitionException [1]
    {   
        SimSharpParser.procedureIdentifier_return retval = new SimSharpParser.procedureIdentifier_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken ID191 = null;

        SimSharpTreeNode ID191_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:459:2: ( ID )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:459:4: ID
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	ID191=(IToken)Match(input,ID,FOLLOW_ID_in_procedureIdentifier2646); if (state.failed) return retval;
            	if ( state.backtracking == 0 )
            	{ID191_tree = (SimSharpTreeNode)adaptor.Create(ID191);
            		adaptor.AddChild(root_0, ID191_tree);
            	}

            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "procedureIdentifier"

    public class formalParameterPart_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "formalParameterPart"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:462:1: formalParameterPart : LPAR formalParameter ( COMMA formalParameter )* RPAR -> ^( FormalParameters ( formalParameter )+ ) ;
    public SimSharpParser.formalParameterPart_return formalParameterPart() // throws RecognitionException [1]
    {   
        SimSharpParser.formalParameterPart_return retval = new SimSharpParser.formalParameterPart_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken LPAR192 = null;
        IToken COMMA194 = null;
        IToken RPAR196 = null;
        SimSharpParser.formalParameter_return formalParameter193 = default(SimSharpParser.formalParameter_return);

        SimSharpParser.formalParameter_return formalParameter195 = default(SimSharpParser.formalParameter_return);


        SimSharpTreeNode LPAR192_tree=null;
        SimSharpTreeNode COMMA194_tree=null;
        SimSharpTreeNode RPAR196_tree=null;
        RewriteRuleTokenStream stream_RPAR = new RewriteRuleTokenStream(adaptor,"token RPAR");
        RewriteRuleTokenStream stream_LPAR = new RewriteRuleTokenStream(adaptor,"token LPAR");
        RewriteRuleTokenStream stream_COMMA = new RewriteRuleTokenStream(adaptor,"token COMMA");
        RewriteRuleSubtreeStream stream_formalParameter = new RewriteRuleSubtreeStream(adaptor,"rule formalParameter");
        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:463:2: ( LPAR formalParameter ( COMMA formalParameter )* RPAR -> ^( FormalParameters ( formalParameter )+ ) )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:463:4: LPAR formalParameter ( COMMA formalParameter )* RPAR
            {
            	LPAR192=(IToken)Match(input,LPAR,FOLLOW_LPAR_in_formalParameterPart2657); if (state.failed) return retval; 
            	if ( (state.backtracking==0) ) stream_LPAR.Add(LPAR192);

            	PushFollow(FOLLOW_formalParameter_in_formalParameterPart2659);
            	formalParameter193 = formalParameter();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( (state.backtracking==0) ) stream_formalParameter.Add(formalParameter193.Tree);
            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:463:25: ( COMMA formalParameter )*
            	do 
            	{
            	    int alt46 = 2;
            	    int LA46_0 = input.LA(1);

            	    if ( (LA46_0 == COMMA) )
            	    {
            	        alt46 = 1;
            	    }


            	    switch (alt46) 
            		{
            			case 1 :
            			    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:463:27: COMMA formalParameter
            			    {
            			    	COMMA194=(IToken)Match(input,COMMA,FOLLOW_COMMA_in_formalParameterPart2663); if (state.failed) return retval; 
            			    	if ( (state.backtracking==0) ) stream_COMMA.Add(COMMA194);

            			    	PushFollow(FOLLOW_formalParameter_in_formalParameterPart2665);
            			    	formalParameter195 = formalParameter();
            			    	state.followingStackPointer--;
            			    	if (state.failed) return retval;
            			    	if ( (state.backtracking==0) ) stream_formalParameter.Add(formalParameter195.Tree);

            			    }
            			    break;

            			default:
            			    goto loop46;
            	    }
            	} while (true);

            	loop46:
            		;	// Stops C# compiler whining that label 'loop46' has no statements

            	RPAR196=(IToken)Match(input,RPAR,FOLLOW_RPAR_in_formalParameterPart2670); if (state.failed) return retval; 
            	if ( (state.backtracking==0) ) stream_RPAR.Add(RPAR196);



            	// AST REWRITE
            	// elements:          formalParameter
            	// token labels:      
            	// rule labels:       retval
            	// token list labels: 
            	// rule list labels:  
            	// wildcard labels: 
            	if ( (state.backtracking==0) ) {
            	retval.Tree = root_0;
            	RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval!=null ? retval.Tree : null);

            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();
            	// 463:57: -> ^( FormalParameters ( formalParameter )+ )
            	{
            	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:463:60: ^( FormalParameters ( formalParameter )+ )
            	    {
            	    SimSharpTreeNode root_1 = (SimSharpTreeNode)adaptor.GetNilNode();
            	    root_1 = (SimSharpTreeNode)adaptor.BecomeRoot((SimSharpTreeNode)adaptor.Create(FormalParameters, "FormalParameters"), root_1);

            	    if ( !(stream_formalParameter.HasNext()) ) {
            	        throw new RewriteEarlyExitException();
            	    }
            	    while ( stream_formalParameter.HasNext() )
            	    {
            	        adaptor.AddChild(root_1, stream_formalParameter.NextTree());

            	    }
            	    stream_formalParameter.Reset();

            	    adaptor.AddChild(root_0, root_1);
            	    }

            	}

            	retval.Tree = root_0;retval.Tree = root_0;}
            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "formalParameterPart"

    public class formalParameter_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "formalParameter"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:466:1: formalParameter : ID ;
    public SimSharpParser.formalParameter_return formalParameter() // throws RecognitionException [1]
    {   
        SimSharpParser.formalParameter_return retval = new SimSharpParser.formalParameter_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken ID197 = null;

        SimSharpTreeNode ID197_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:467:2: ( ID )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:467:4: ID
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	ID197=(IToken)Match(input,ID,FOLLOW_ID_in_formalParameter2690); if (state.failed) return retval;
            	if ( state.backtracking == 0 )
            	{ID197_tree = (SimSharpTreeNode)adaptor.Create(ID197);
            		adaptor.AddChild(root_0, ID197_tree);
            	}

            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "formalParameter"

    public class specificationPart_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "specificationPart"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:470:1: specificationPart : specifier identifierList ( ( SCOLON specifier )=> SCOLON specifier identifierList )* -> ^( Specification ( specifier identifierList )+ ) ;
    public SimSharpParser.specificationPart_return specificationPart() // throws RecognitionException [1]
    {   
        SimSharpParser.specificationPart_return retval = new SimSharpParser.specificationPart_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken SCOLON200 = null;
        SimSharpParser.specifier_return specifier198 = default(SimSharpParser.specifier_return);

        SimSharpParser.identifierList_return identifierList199 = default(SimSharpParser.identifierList_return);

        SimSharpParser.specifier_return specifier201 = default(SimSharpParser.specifier_return);

        SimSharpParser.identifierList_return identifierList202 = default(SimSharpParser.identifierList_return);


        SimSharpTreeNode SCOLON200_tree=null;
        RewriteRuleTokenStream stream_SCOLON = new RewriteRuleTokenStream(adaptor,"token SCOLON");
        RewriteRuleSubtreeStream stream_specifier = new RewriteRuleSubtreeStream(adaptor,"rule specifier");
        RewriteRuleSubtreeStream stream_identifierList = new RewriteRuleSubtreeStream(adaptor,"rule identifierList");
        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:471:2: ( specifier identifierList ( ( SCOLON specifier )=> SCOLON specifier identifierList )* -> ^( Specification ( specifier identifierList )+ ) )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:471:4: specifier identifierList ( ( SCOLON specifier )=> SCOLON specifier identifierList )*
            {
            	PushFollow(FOLLOW_specifier_in_specificationPart2701);
            	specifier198 = specifier();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( (state.backtracking==0) ) stream_specifier.Add(specifier198.Tree);
            	PushFollow(FOLLOW_identifierList_in_specificationPart2703);
            	identifierList199 = identifierList();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( (state.backtracking==0) ) stream_identifierList.Add(identifierList199.Tree);
            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:471:29: ( ( SCOLON specifier )=> SCOLON specifier identifierList )*
            	do 
            	{
            	    int alt47 = 2;
            	    int LA47_0 = input.LA(1);

            	    if ( (LA47_0 == SCOLON) )
            	    {
            	        int LA47_1 = input.LA(2);

            	        if ( (synpred16_SimSharp()) )
            	        {
            	            alt47 = 1;
            	        }


            	    }


            	    switch (alt47) 
            		{
            			case 1 :
            			    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:471:31: ( SCOLON specifier )=> SCOLON specifier identifierList
            			    {
            			    	SCOLON200=(IToken)Match(input,SCOLON,FOLLOW_SCOLON_in_specificationPart2715); if (state.failed) return retval; 
            			    	if ( (state.backtracking==0) ) stream_SCOLON.Add(SCOLON200);

            			    	PushFollow(FOLLOW_specifier_in_specificationPart2717);
            			    	specifier201 = specifier();
            			    	state.followingStackPointer--;
            			    	if (state.failed) return retval;
            			    	if ( (state.backtracking==0) ) stream_specifier.Add(specifier201.Tree);
            			    	PushFollow(FOLLOW_identifierList_in_specificationPart2719);
            			    	identifierList202 = identifierList();
            			    	state.followingStackPointer--;
            			    	if (state.failed) return retval;
            			    	if ( (state.backtracking==0) ) stream_identifierList.Add(identifierList202.Tree);

            			    }
            			    break;

            			default:
            			    goto loop47;
            	    }
            	} while (true);

            	loop47:
            		;	// Stops C# compiler whining that label 'loop47' has no statements



            	// AST REWRITE
            	// elements:          specifier, identifierList
            	// token labels:      
            	// rule labels:       retval
            	// token list labels: 
            	// rule list labels:  
            	// wildcard labels: 
            	if ( (state.backtracking==0) ) {
            	retval.Tree = root_0;
            	RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval!=null ? retval.Tree : null);

            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();
            	// 471:89: -> ^( Specification ( specifier identifierList )+ )
            	{
            	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:471:92: ^( Specification ( specifier identifierList )+ )
            	    {
            	    SimSharpTreeNode root_1 = (SimSharpTreeNode)adaptor.GetNilNode();
            	    root_1 = (SimSharpTreeNode)adaptor.BecomeRoot((SimSharpTreeNode)adaptor.Create(Specification, "Specification"), root_1);

            	    if ( !(stream_specifier.HasNext() || stream_identifierList.HasNext()) ) {
            	        throw new RewriteEarlyExitException();
            	    }
            	    while ( stream_specifier.HasNext() || stream_identifierList.HasNext() )
            	    {
            	        adaptor.AddChild(root_1, stream_specifier.NextTree());
            	        adaptor.AddChild(root_1, stream_identifierList.NextTree());

            	    }
            	    stream_specifier.Reset();
            	    stream_identifierList.Reset();

            	    adaptor.AddChild(root_0, root_1);
            	    }

            	}

            	retval.Tree = root_0;retval.Tree = root_0;}
            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "specificationPart"

    public class specifier_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "specifier"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:474:1: specifier : ( type ( ARRAY | PROCEDURE )? | LABEL | SWITCH );
    public SimSharpParser.specifier_return specifier() // throws RecognitionException [1]
    {   
        SimSharpParser.specifier_return retval = new SimSharpParser.specifier_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken set204 = null;
        IToken LABEL205 = null;
        IToken SWITCH206 = null;
        SimSharpParser.type_return type203 = default(SimSharpParser.type_return);


        SimSharpTreeNode set204_tree=null;
        SimSharpTreeNode LABEL205_tree=null;
        SimSharpTreeNode SWITCH206_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:475:2: ( type ( ARRAY | PROCEDURE )? | LABEL | SWITCH )
            int alt49 = 3;
            switch ( input.LA(1) ) 
            {
            case BOOLEAN:
            case CHARACTER:
            case INTEGER:
            case SHORT:
            case REAL:
            case LONG:
            case TEXT:
            case REF:
            	{
                alt49 = 1;
                }
                break;
            case LABEL:
            	{
                alt49 = 2;
                }
                break;
            case SWITCH:
            	{
                alt49 = 3;
                }
                break;
            	default:
            	    if ( state.backtracking > 0 ) {state.failed = true; return retval;}
            	    NoViableAltException nvae_d49s0 =
            	        new NoViableAltException("", 49, 0, input);

            	    throw nvae_d49s0;
            }

            switch (alt49) 
            {
                case 1 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:475:4: type ( ARRAY | PROCEDURE )?
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	PushFollow(FOLLOW_type_in_specifier2749);
                    	type203 = type();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, type203.Tree);
                    	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:475:9: ( ARRAY | PROCEDURE )?
                    	int alt48 = 2;
                    	int LA48_0 = input.LA(1);

                    	if ( (LA48_0 == PROCEDURE || LA48_0 == ARRAY) )
                    	{
                    	    alt48 = 1;
                    	}
                    	switch (alt48) 
                    	{
                    	    case 1 :
                    	        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:
                    	        {
                    	        	set204 = (IToken)input.LT(1);
                    	        	if ( input.LA(1) == PROCEDURE || input.LA(1) == ARRAY ) 
                    	        	{
                    	        	    input.Consume();
                    	        	    if ( state.backtracking == 0 ) adaptor.AddChild(root_0, (SimSharpTreeNode)adaptor.Create(set204));
                    	        	    state.errorRecovery = false;state.failed = false;
                    	        	}
                    	        	else 
                    	        	{
                    	        	    if ( state.backtracking > 0 ) {state.failed = true; return retval;}
                    	        	    MismatchedSetException mse = new MismatchedSetException(null,input);
                    	        	    throw mse;
                    	        	}


                    	        }
                    	        break;

                    	}


                    }
                    break;
                case 2 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:476:11: LABEL
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	LABEL205=(IToken)Match(input,LABEL,FOLLOW_LABEL_in_specifier2772); if (state.failed) return retval;
                    	if ( state.backtracking == 0 )
                    	{LABEL205_tree = (SimSharpTreeNode)adaptor.Create(LABEL205);
                    		adaptor.AddChild(root_0, LABEL205_tree);
                    	}

                    }
                    break;
                case 3 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:477:11: SWITCH
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	SWITCH206=(IToken)Match(input,SWITCH,FOLLOW_SWITCH_in_specifier2784); if (state.failed) return retval;
                    	if ( state.backtracking == 0 )
                    	{SWITCH206_tree = (SimSharpTreeNode)adaptor.Create(SWITCH206);
                    		adaptor.AddChild(root_0, SWITCH206_tree);
                    	}

                    }
                    break;

            }
            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "specifier"

    public class modePart_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "modePart"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:480:1: modePart : ( namePart ( valuePart )? | valuePart ( namePart )? );
    public SimSharpParser.modePart_return modePart() // throws RecognitionException [1]
    {   
        SimSharpParser.modePart_return retval = new SimSharpParser.modePart_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        SimSharpParser.namePart_return namePart207 = default(SimSharpParser.namePart_return);

        SimSharpParser.valuePart_return valuePart208 = default(SimSharpParser.valuePart_return);

        SimSharpParser.valuePart_return valuePart209 = default(SimSharpParser.valuePart_return);

        SimSharpParser.namePart_return namePart210 = default(SimSharpParser.namePart_return);



        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:481:2: ( namePart ( valuePart )? | valuePart ( namePart )? )
            int alt52 = 2;
            int LA52_0 = input.LA(1);

            if ( (LA52_0 == NAME) )
            {
                alt52 = 1;
            }
            else if ( (LA52_0 == VALUE) )
            {
                alt52 = 2;
            }
            else 
            {
                if ( state.backtracking > 0 ) {state.failed = true; return retval;}
                NoViableAltException nvae_d52s0 =
                    new NoViableAltException("", 52, 0, input);

                throw nvae_d52s0;
            }
            switch (alt52) 
            {
                case 1 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:481:4: namePart ( valuePart )?
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	PushFollow(FOLLOW_namePart_in_modePart2795);
                    	namePart207 = namePart();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, namePart207.Tree);
                    	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:481:13: ( valuePart )?
                    	int alt50 = 2;
                    	int LA50_0 = input.LA(1);

                    	if ( (LA50_0 == VALUE) )
                    	{
                    	    alt50 = 1;
                    	}
                    	switch (alt50) 
                    	{
                    	    case 1 :
                    	        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:481:15: valuePart
                    	        {
                    	        	PushFollow(FOLLOW_valuePart_in_modePart2799);
                    	        	valuePart208 = valuePart();
                    	        	state.followingStackPointer--;
                    	        	if (state.failed) return retval;
                    	        	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, valuePart208.Tree);

                    	        }
                    	        break;

                    	}


                    }
                    break;
                case 2 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:482:11: valuePart ( namePart )?
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	PushFollow(FOLLOW_valuePart_in_modePart2814);
                    	valuePart209 = valuePart();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, valuePart209.Tree);
                    	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:482:21: ( namePart )?
                    	int alt51 = 2;
                    	int LA51_0 = input.LA(1);

                    	if ( (LA51_0 == NAME) )
                    	{
                    	    alt51 = 1;
                    	}
                    	switch (alt51) 
                    	{
                    	    case 1 :
                    	        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:482:23: namePart
                    	        {
                    	        	PushFollow(FOLLOW_namePart_in_modePart2818);
                    	        	namePart210 = namePart();
                    	        	state.followingStackPointer--;
                    	        	if (state.failed) return retval;
                    	        	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, namePart210.Tree);

                    	        }
                    	        break;

                    	}


                    }
                    break;

            }
            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "modePart"

    public class namePart_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "namePart"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:485:1: namePart : NAME identifierList SCOLON ;
    public SimSharpParser.namePart_return namePart() // throws RecognitionException [1]
    {   
        SimSharpParser.namePart_return retval = new SimSharpParser.namePart_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken NAME211 = null;
        IToken SCOLON213 = null;
        SimSharpParser.identifierList_return identifierList212 = default(SimSharpParser.identifierList_return);


        SimSharpTreeNode NAME211_tree=null;
        SimSharpTreeNode SCOLON213_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:486:2: ( NAME identifierList SCOLON )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:486:4: NAME identifierList SCOLON
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	NAME211=(IToken)Match(input,NAME,FOLLOW_NAME_in_namePart2832); if (state.failed) return retval;
            	if ( state.backtracking == 0 )
            	{NAME211_tree = (SimSharpTreeNode)adaptor.Create(NAME211);
            		root_0 = (SimSharpTreeNode)adaptor.BecomeRoot(NAME211_tree, root_0);
            	}
            	PushFollow(FOLLOW_identifierList_in_namePart2835);
            	identifierList212 = identifierList();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, identifierList212.Tree);
            	SCOLON213=(IToken)Match(input,SCOLON,FOLLOW_SCOLON_in_namePart2837); if (state.failed) return retval;

            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "namePart"

    public class valuePart_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "valuePart"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:489:1: valuePart : VALUE identifierList SCOLON ;
    public SimSharpParser.valuePart_return valuePart() // throws RecognitionException [1]
    {   
        SimSharpParser.valuePart_return retval = new SimSharpParser.valuePart_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken VALUE214 = null;
        IToken SCOLON216 = null;
        SimSharpParser.identifierList_return identifierList215 = default(SimSharpParser.identifierList_return);


        SimSharpTreeNode VALUE214_tree=null;
        SimSharpTreeNode SCOLON216_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:490:2: ( VALUE identifierList SCOLON )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:490:4: VALUE identifierList SCOLON
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	VALUE214=(IToken)Match(input,VALUE,FOLLOW_VALUE_in_valuePart2849); if (state.failed) return retval;
            	if ( state.backtracking == 0 )
            	{VALUE214_tree = (SimSharpTreeNode)adaptor.Create(VALUE214);
            		root_0 = (SimSharpTreeNode)adaptor.BecomeRoot(VALUE214_tree, root_0);
            	}
            	PushFollow(FOLLOW_identifierList_in_valuePart2852);
            	identifierList215 = identifierList();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, identifierList215.Tree);
            	SCOLON216=(IToken)Match(input,SCOLON,FOLLOW_SCOLON_in_valuePart2854); if (state.failed) return retval;

            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "valuePart"

    public class identifierList_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "identifierList"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:493:1: identifierList : ID ( COMMA ID )* ;
    public SimSharpParser.identifierList_return identifierList() // throws RecognitionException [1]
    {   
        SimSharpParser.identifierList_return retval = new SimSharpParser.identifierList_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken ID217 = null;
        IToken COMMA218 = null;
        IToken ID219 = null;

        SimSharpTreeNode ID217_tree=null;
        SimSharpTreeNode COMMA218_tree=null;
        SimSharpTreeNode ID219_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:494:2: ( ID ( COMMA ID )* )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:494:4: ID ( COMMA ID )*
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	ID217=(IToken)Match(input,ID,FOLLOW_ID_in_identifierList2867); if (state.failed) return retval;
            	if ( state.backtracking == 0 )
            	{ID217_tree = (SimSharpTreeNode)adaptor.Create(ID217);
            		adaptor.AddChild(root_0, ID217_tree);
            	}
            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:494:7: ( COMMA ID )*
            	do 
            	{
            	    int alt53 = 2;
            	    int LA53_0 = input.LA(1);

            	    if ( (LA53_0 == COMMA) )
            	    {
            	        alt53 = 1;
            	    }


            	    switch (alt53) 
            		{
            			case 1 :
            			    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:494:8: COMMA ID
            			    {
            			    	COMMA218=(IToken)Match(input,COMMA,FOLLOW_COMMA_in_identifierList2870); if (state.failed) return retval;
            			    	ID219=(IToken)Match(input,ID,FOLLOW_ID_in_identifierList2873); if (state.failed) return retval;
            			    	if ( state.backtracking == 0 )
            			    	{ID219_tree = (SimSharpTreeNode)adaptor.Create(ID219);
            			    		adaptor.AddChild(root_0, ID219_tree);
            			    	}

            			    }
            			    break;

            			default:
            			    goto loop53;
            	    }
            	} while (true);

            	loop53:
            		;	// Stops C# compiler whining that label 'loop53' has no statements


            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "identifierList"

    public class classDeclaration_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "classDeclaration"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:497:1: classDeclaration : ( prefix )? mainPart -> ^( ClassDecl ( prefix )? mainPart ) ;
    public SimSharpParser.classDeclaration_return classDeclaration() // throws RecognitionException [1]
    {   
        SimSharpParser.classDeclaration_return retval = new SimSharpParser.classDeclaration_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        SimSharpParser.prefix_return prefix220 = default(SimSharpParser.prefix_return);

        SimSharpParser.mainPart_return mainPart221 = default(SimSharpParser.mainPart_return);


        RewriteRuleSubtreeStream stream_prefix = new RewriteRuleSubtreeStream(adaptor,"rule prefix");
        RewriteRuleSubtreeStream stream_mainPart = new RewriteRuleSubtreeStream(adaptor,"rule mainPart");
        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:498:2: ( ( prefix )? mainPart -> ^( ClassDecl ( prefix )? mainPart ) )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:498:4: ( prefix )? mainPart
            {
            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:498:4: ( prefix )?
            	int alt54 = 2;
            	int LA54_0 = input.LA(1);

            	if ( (LA54_0 == ID) )
            	{
            	    alt54 = 1;
            	}
            	switch (alt54) 
            	{
            	    case 1 :
            	        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:498:6: prefix
            	        {
            	        	PushFollow(FOLLOW_prefix_in_classDeclaration2889);
            	        	prefix220 = prefix();
            	        	state.followingStackPointer--;
            	        	if (state.failed) return retval;
            	        	if ( (state.backtracking==0) ) stream_prefix.Add(prefix220.Tree);

            	        }
            	        break;

            	}

            	PushFollow(FOLLOW_mainPart_in_classDeclaration2894);
            	mainPart221 = mainPart();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( (state.backtracking==0) ) stream_mainPart.Add(mainPart221.Tree);


            	// AST REWRITE
            	// elements:          prefix, mainPart
            	// token labels:      
            	// rule labels:       retval
            	// token list labels: 
            	// rule list labels:  
            	// wildcard labels: 
            	if ( (state.backtracking==0) ) {
            	retval.Tree = root_0;
            	RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval!=null ? retval.Tree : null);

            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();
            	// 498:25: -> ^( ClassDecl ( prefix )? mainPart )
            	{
            	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:498:28: ^( ClassDecl ( prefix )? mainPart )
            	    {
            	    SimSharpTreeNode root_1 = (SimSharpTreeNode)adaptor.GetNilNode();
            	    root_1 = (SimSharpTreeNode)adaptor.BecomeRoot((SimSharpTreeNode)adaptor.Create(ClassDecl, "ClassDecl"), root_1);

            	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:498:40: ( prefix )?
            	    if ( stream_prefix.HasNext() )
            	    {
            	        adaptor.AddChild(root_1, stream_prefix.NextTree());

            	    }
            	    stream_prefix.Reset();
            	    adaptor.AddChild(root_1, stream_mainPart.NextTree());

            	    adaptor.AddChild(root_0, root_1);
            	    }

            	}

            	retval.Tree = root_0;retval.Tree = root_0;}
            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "classDeclaration"

    public class prefix_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "prefix"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:501:1: prefix : classIdentifier ;
    public SimSharpParser.prefix_return prefix() // throws RecognitionException [1]
    {   
        SimSharpParser.prefix_return retval = new SimSharpParser.prefix_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        SimSharpParser.classIdentifier_return classIdentifier222 = default(SimSharpParser.classIdentifier_return);



        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:501:8: ( classIdentifier )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:501:10: classIdentifier
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	PushFollow(FOLLOW_classIdentifier_in_prefix2915);
            	classIdentifier222 = classIdentifier();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, classIdentifier222.Tree);

            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "prefix"

    public class mainPart_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "mainPart"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:504:1: mainPart : CLASS i= ID ( formalParameterPart SCOLON ( valuePart )? specificationPart )? SCOLON ( protectionPart SCOLON )? ( virtualPart SCOLON )? classBody (~ ( END | ELSE | WHEN | OTHERWISE | SCOLON ) )* ;
    public SimSharpParser.mainPart_return mainPart() // throws RecognitionException [1]
    {   
        SimSharpParser.mainPart_return retval = new SimSharpParser.mainPart_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken i = null;
        IToken CLASS223 = null;
        IToken SCOLON225 = null;
        IToken SCOLON228 = null;
        IToken SCOLON230 = null;
        IToken SCOLON232 = null;
        IToken set234 = null;
        SimSharpParser.formalParameterPart_return formalParameterPart224 = default(SimSharpParser.formalParameterPart_return);

        SimSharpParser.valuePart_return valuePart226 = default(SimSharpParser.valuePart_return);

        SimSharpParser.specificationPart_return specificationPart227 = default(SimSharpParser.specificationPart_return);

        SimSharpParser.protectionPart_return protectionPart229 = default(SimSharpParser.protectionPart_return);

        SimSharpParser.virtualPart_return virtualPart231 = default(SimSharpParser.virtualPart_return);

        SimSharpParser.classBody_return classBody233 = default(SimSharpParser.classBody_return);


        SimSharpTreeNode i_tree=null;
        SimSharpTreeNode CLASS223_tree=null;
        SimSharpTreeNode SCOLON225_tree=null;
        SimSharpTreeNode SCOLON228_tree=null;
        SimSharpTreeNode SCOLON230_tree=null;
        SimSharpTreeNode SCOLON232_tree=null;
        SimSharpTreeNode set234_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:505:2: ( CLASS i= ID ( formalParameterPart SCOLON ( valuePart )? specificationPart )? SCOLON ( protectionPart SCOLON )? ( virtualPart SCOLON )? classBody (~ ( END | ELSE | WHEN | OTHERWISE | SCOLON ) )* )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:505:4: CLASS i= ID ( formalParameterPart SCOLON ( valuePart )? specificationPart )? SCOLON ( protectionPart SCOLON )? ( virtualPart SCOLON )? classBody (~ ( END | ELSE | WHEN | OTHERWISE | SCOLON ) )*
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	CLASS223=(IToken)Match(input,CLASS,FOLLOW_CLASS_in_mainPart2926); if (state.failed) return retval;
            	if ( state.backtracking == 0 )
            	{CLASS223_tree = (SimSharpTreeNode)adaptor.Create(CLASS223);
            		adaptor.AddChild(root_0, CLASS223_tree);
            	}
            	i=(IToken)Match(input,ID,FOLLOW_ID_in_mainPart2930); if (state.failed) return retval;
            	if ( state.backtracking == 0 )
            	{i_tree = (SimSharpTreeNode)adaptor.Create(i);
            		adaptor.AddChild(root_0, i_tree);
            	}
            	if ( (state.backtracking==0) )
            	{
            	   	
            	  	  	TypeSymbol c = ctx.CurrentType.AddType(((i != null) ? i.Text : null), null); 
            	  	  	ctx.Push(c);
            	  	  
            	}
            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:510:3: ( formalParameterPart SCOLON ( valuePart )? specificationPart )?
            	int alt56 = 2;
            	int LA56_0 = input.LA(1);

            	if ( (LA56_0 == LPAR) )
            	{
            	    alt56 = 1;
            	}
            	switch (alt56) 
            	{
            	    case 1 :
            	        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:510:5: formalParameterPart SCOLON ( valuePart )? specificationPart
            	        {
            	        	PushFollow(FOLLOW_formalParameterPart_in_mainPart2942);
            	        	formalParameterPart224 = formalParameterPart();
            	        	state.followingStackPointer--;
            	        	if (state.failed) return retval;
            	        	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, formalParameterPart224.Tree);
            	        	SCOLON225=(IToken)Match(input,SCOLON,FOLLOW_SCOLON_in_mainPart2944); if (state.failed) return retval;
            	        	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:511:11: ( valuePart )?
            	        	int alt55 = 2;
            	        	int LA55_0 = input.LA(1);

            	        	if ( (LA55_0 == VALUE) )
            	        	{
            	        	    alt55 = 1;
            	        	}
            	        	switch (alt55) 
            	        	{
            	        	    case 1 :
            	        	        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:511:13: valuePart
            	        	        {
            	        	        	PushFollow(FOLLOW_valuePart_in_mainPart2960);
            	        	        	valuePart226 = valuePart();
            	        	        	state.followingStackPointer--;
            	        	        	if (state.failed) return retval;
            	        	        	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, valuePart226.Tree);

            	        	        }
            	        	        break;

            	        	}

            	        	PushFollow(FOLLOW_specificationPart_in_mainPart2966);
            	        	specificationPart227 = specificationPart();
            	        	state.followingStackPointer--;
            	        	if (state.failed) return retval;
            	        	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, specificationPart227.Tree);

            	        }
            	        break;

            	}

            	SCOLON228=(IToken)Match(input,SCOLON,FOLLOW_SCOLON_in_mainPart2971); if (state.failed) return retval;
            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:512:11: ( protectionPart SCOLON )?
            	int alt57 = 2;
            	int LA57_0 = input.LA(1);

            	if ( ((LA57_0 >= HIDDEN && LA57_0 <= PROTECTED)) )
            	{
            	    alt57 = 1;
            	}
            	switch (alt57) 
            	{
            	    case 1 :
            	        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:512:13: protectionPart SCOLON
            	        {
            	        	PushFollow(FOLLOW_protectionPart_in_mainPart2987);
            	        	protectionPart229 = protectionPart();
            	        	state.followingStackPointer--;
            	        	if (state.failed) return retval;
            	        	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, protectionPart229.Tree);
            	        	SCOLON230=(IToken)Match(input,SCOLON,FOLLOW_SCOLON_in_mainPart2989); if (state.failed) return retval;

            	        }
            	        break;

            	}

            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:513:11: ( virtualPart SCOLON )?
            	int alt58 = 2;
            	int LA58_0 = input.LA(1);

            	if ( (LA58_0 == VIRTUAL) )
            	{
            	    alt58 = 1;
            	}
            	switch (alt58) 
            	{
            	    case 1 :
            	        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:513:13: virtualPart SCOLON
            	        {
            	        	PushFollow(FOLLOW_virtualPart_in_mainPart3007);
            	        	virtualPart231 = virtualPart();
            	        	state.followingStackPointer--;
            	        	if (state.failed) return retval;
            	        	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, virtualPart231.Tree);
            	        	SCOLON232=(IToken)Match(input,SCOLON,FOLLOW_SCOLON_in_mainPart3009); if (state.failed) return retval;

            	        }
            	        break;

            	}

            	PushFollow(FOLLOW_classBody_in_mainPart3024);
            	classBody233 = classBody();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, classBody233.Tree);
            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:514:20: (~ ( END | ELSE | WHEN | OTHERWISE | SCOLON ) )*
            	do 
            	{
            	    int alt59 = 2;
            	    int LA59_0 = input.LA(1);

            	    if ( ((LA59_0 >= SimulaSourceModule && LA59_0 <= REFNEQ) || (LA59_0 >= COLON && LA59_0 <= DELAY) || (LA59_0 >= IF && LA59_0 <= INSPECT) || LA59_0 == BEGIN || (LA59_0 >= ARRAY && LA59_0 <= Z)) )
            	    {
            	        alt59 = 1;
            	    }


            	    switch (alt59) 
            		{
            			case 1 :
            			    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:514:21: ~ ( END | ELSE | WHEN | OTHERWISE | SCOLON )
            			    {
            			    	set234 = (IToken)input.LT(1);
            			    	if ( (input.LA(1) >= SimulaSourceModule && input.LA(1) <= REFNEQ) || (input.LA(1) >= COLON && input.LA(1) <= DELAY) || (input.LA(1) >= IF && input.LA(1) <= INSPECT) || input.LA(1) == BEGIN || (input.LA(1) >= ARRAY && input.LA(1) <= Z) ) 
            			    	{
            			    	    input.Consume();
            			    	    state.errorRecovery = false;state.failed = false;
            			    	}
            			    	else 
            			    	{
            			    	    if ( state.backtracking > 0 ) {state.failed = true; return retval;}
            			    	    MismatchedSetException mse = new MismatchedSetException(null,input);
            			    	    throw mse;
            			    	}


            			    }
            			    break;

            			default:
            			    goto loop59;
            	    }
            	} while (true);

            	loop59:
            		;	// Stops C# compiler whining that label 'loop59' has no statements

            	if ( (state.backtracking==0) )
            	{
            	   ctx.Pop(); 
            	}

            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "mainPart"

    public class classIdentifier_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "classIdentifier"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:518:1: classIdentifier : ID ;
    public SimSharpParser.classIdentifier_return classIdentifier() // throws RecognitionException [1]
    {   
        SimSharpParser.classIdentifier_return retval = new SimSharpParser.classIdentifier_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken ID235 = null;

        SimSharpTreeNode ID235_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:519:2: ( ID )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:519:4: ID
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	ID235=(IToken)Match(input,ID,FOLLOW_ID_in_classIdentifier3063); if (state.failed) return retval;
            	if ( state.backtracking == 0 )
            	{ID235_tree = (SimSharpTreeNode)adaptor.Create(ID235);
            		adaptor.AddChild(root_0, ID235_tree);
            	}

            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "classIdentifier"

    public class classBody_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "classBody"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:522:1: classBody : BEGIN initialOperations ( SCOLON finalOperations )? END -> ^( ClassBody initialOperations ( finalOperations )? ) ;
    public SimSharpParser.classBody_return classBody() // throws RecognitionException [1]
    {   
        SimSharpParser.classBody_return retval = new SimSharpParser.classBody_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken BEGIN236 = null;
        IToken SCOLON238 = null;
        IToken END240 = null;
        SimSharpParser.initialOperations_return initialOperations237 = default(SimSharpParser.initialOperations_return);

        SimSharpParser.finalOperations_return finalOperations239 = default(SimSharpParser.finalOperations_return);


        SimSharpTreeNode BEGIN236_tree=null;
        SimSharpTreeNode SCOLON238_tree=null;
        SimSharpTreeNode END240_tree=null;
        RewriteRuleTokenStream stream_END = new RewriteRuleTokenStream(adaptor,"token END");
        RewriteRuleTokenStream stream_BEGIN = new RewriteRuleTokenStream(adaptor,"token BEGIN");
        RewriteRuleTokenStream stream_SCOLON = new RewriteRuleTokenStream(adaptor,"token SCOLON");
        RewriteRuleSubtreeStream stream_initialOperations = new RewriteRuleSubtreeStream(adaptor,"rule initialOperations");
        RewriteRuleSubtreeStream stream_finalOperations = new RewriteRuleSubtreeStream(adaptor,"rule finalOperations");
        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:523:2: ( BEGIN initialOperations ( SCOLON finalOperations )? END -> ^( ClassBody initialOperations ( finalOperations )? ) )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:523:4: BEGIN initialOperations ( SCOLON finalOperations )? END
            {
            	BEGIN236=(IToken)Match(input,BEGIN,FOLLOW_BEGIN_in_classBody3075); if (state.failed) return retval; 
            	if ( (state.backtracking==0) ) stream_BEGIN.Add(BEGIN236);

            	PushFollow(FOLLOW_initialOperations_in_classBody3077);
            	initialOperations237 = initialOperations();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( (state.backtracking==0) ) stream_initialOperations.Add(initialOperations237.Tree);
            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:523:28: ( SCOLON finalOperations )?
            	int alt60 = 2;
            	int LA60_0 = input.LA(1);

            	if ( (LA60_0 == SCOLON) )
            	{
            	    alt60 = 1;
            	}
            	switch (alt60) 
            	{
            	    case 1 :
            	        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:523:29: SCOLON finalOperations
            	        {
            	        	SCOLON238=(IToken)Match(input,SCOLON,FOLLOW_SCOLON_in_classBody3080); if (state.failed) return retval; 
            	        	if ( (state.backtracking==0) ) stream_SCOLON.Add(SCOLON238);

            	        	PushFollow(FOLLOW_finalOperations_in_classBody3082);
            	        	finalOperations239 = finalOperations();
            	        	state.followingStackPointer--;
            	        	if (state.failed) return retval;
            	        	if ( (state.backtracking==0) ) stream_finalOperations.Add(finalOperations239.Tree);

            	        }
            	        break;

            	}

            	END240=(IToken)Match(input,END,FOLLOW_END_in_classBody3086); if (state.failed) return retval; 
            	if ( (state.backtracking==0) ) stream_END.Add(END240);



            	// AST REWRITE
            	// elements:          initialOperations, finalOperations
            	// token labels:      
            	// rule labels:       retval
            	// token list labels: 
            	// rule list labels:  
            	// wildcard labels: 
            	if ( (state.backtracking==0) ) {
            	retval.Tree = root_0;
            	RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval!=null ? retval.Tree : null);

            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();
            	// 523:59: -> ^( ClassBody initialOperations ( finalOperations )? )
            	{
            	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:523:62: ^( ClassBody initialOperations ( finalOperations )? )
            	    {
            	    SimSharpTreeNode root_1 = (SimSharpTreeNode)adaptor.GetNilNode();
            	    root_1 = (SimSharpTreeNode)adaptor.BecomeRoot((SimSharpTreeNode)adaptor.Create(ClassBody, "ClassBody"), root_1);

            	    adaptor.AddChild(root_1, stream_initialOperations.NextTree());
            	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:523:92: ( finalOperations )?
            	    if ( stream_finalOperations.HasNext() )
            	    {
            	        adaptor.AddChild(root_1, stream_finalOperations.NextTree());

            	    }
            	    stream_finalOperations.Reset();

            	    adaptor.AddChild(root_0, root_1);
            	    }

            	}

            	retval.Tree = root_0;retval.Tree = root_0;}
            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "classBody"

    public class initialOperations_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "initialOperations"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:528:1: initialOperations : ( ( statement )=> statement ( ( SCOLON statement )=> SCOLON statement )* -> ^( Prolog ( statement )* ) | declaration ( ( SCOLON declaration )=> SCOLON declaration )* ( ( SCOLON statement )=> SCOLON statement )* -> ^( Prolog ( declaration )* ( statement )* ) );
    public SimSharpParser.initialOperations_return initialOperations() // throws RecognitionException [1]
    {   
        SimSharpParser.initialOperations_return retval = new SimSharpParser.initialOperations_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken SCOLON242 = null;
        IToken SCOLON245 = null;
        IToken SCOLON247 = null;
        SimSharpParser.statement_return statement241 = default(SimSharpParser.statement_return);

        SimSharpParser.statement_return statement243 = default(SimSharpParser.statement_return);

        SimSharpParser.declaration_return declaration244 = default(SimSharpParser.declaration_return);

        SimSharpParser.declaration_return declaration246 = default(SimSharpParser.declaration_return);

        SimSharpParser.statement_return statement248 = default(SimSharpParser.statement_return);


        SimSharpTreeNode SCOLON242_tree=null;
        SimSharpTreeNode SCOLON245_tree=null;
        SimSharpTreeNode SCOLON247_tree=null;
        RewriteRuleTokenStream stream_SCOLON = new RewriteRuleTokenStream(adaptor,"token SCOLON");
        RewriteRuleSubtreeStream stream_statement = new RewriteRuleSubtreeStream(adaptor,"rule statement");
        RewriteRuleSubtreeStream stream_declaration = new RewriteRuleSubtreeStream(adaptor,"rule declaration");
        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:529:2: ( ( statement )=> statement ( ( SCOLON statement )=> SCOLON statement )* -> ^( Prolog ( statement )* ) | declaration ( ( SCOLON declaration )=> SCOLON declaration )* ( ( SCOLON statement )=> SCOLON statement )* -> ^( Prolog ( declaration )* ( statement )* ) )
            int alt64 = 2;
            alt64 = dfa64.Predict(input);
            switch (alt64) 
            {
                case 1 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:529:4: ( statement )=> statement ( ( SCOLON statement )=> SCOLON statement )*
                    {
                    	PushFollow(FOLLOW_statement_in_initialOperations3120);
                    	statement241 = statement();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( (state.backtracking==0) ) stream_statement.Add(statement241.Tree);
                    	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:529:29: ( ( SCOLON statement )=> SCOLON statement )*
                    	do 
                    	{
                    	    int alt61 = 2;
                    	    int LA61_0 = input.LA(1);

                    	    if ( (LA61_0 == SCOLON) )
                    	    {
                    	        int LA61_1 = input.LA(2);

                    	        if ( (synpred18_SimSharp()) )
                    	        {
                    	            alt61 = 1;
                    	        }


                    	    }


                    	    switch (alt61) 
                    		{
                    			case 1 :
                    			    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:529:30: ( SCOLON statement )=> SCOLON statement
                    			    {
                    			    	SCOLON242=(IToken)Match(input,SCOLON,FOLLOW_SCOLON_in_initialOperations3131); if (state.failed) return retval; 
                    			    	if ( (state.backtracking==0) ) stream_SCOLON.Add(SCOLON242);

                    			    	PushFollow(FOLLOW_statement_in_initialOperations3133);
                    			    	statement243 = statement();
                    			    	state.followingStackPointer--;
                    			    	if (state.failed) return retval;
                    			    	if ( (state.backtracking==0) ) stream_statement.Add(statement243.Tree);

                    			    }
                    			    break;

                    			default:
                    			    goto loop61;
                    	    }
                    	} while (true);

                    	loop61:
                    		;	// Stops C# compiler whining that label 'loop61' has no statements



                    	// AST REWRITE
                    	// elements:          statement
                    	// token labels:      
                    	// rule labels:       retval
                    	// token list labels: 
                    	// rule list labels:  
                    	// wildcard labels: 
                    	if ( (state.backtracking==0) ) {
                    	retval.Tree = root_0;
                    	RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval!=null ? retval.Tree : null);

                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();
                    	// 529:71: -> ^( Prolog ( statement )* )
                    	{
                    	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:529:74: ^( Prolog ( statement )* )
                    	    {
                    	    SimSharpTreeNode root_1 = (SimSharpTreeNode)adaptor.GetNilNode();
                    	    root_1 = (SimSharpTreeNode)adaptor.BecomeRoot((SimSharpTreeNode)adaptor.Create(Prolog, "Prolog"), root_1);

                    	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:529:83: ( statement )*
                    	    while ( stream_statement.HasNext() )
                    	    {
                    	        adaptor.AddChild(root_1, stream_statement.NextTree());

                    	    }
                    	    stream_statement.Reset();

                    	    adaptor.AddChild(root_0, root_1);
                    	    }

                    	}

                    	retval.Tree = root_0;retval.Tree = root_0;}
                    }
                    break;
                case 2 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:530:4: declaration ( ( SCOLON declaration )=> SCOLON declaration )* ( ( SCOLON statement )=> SCOLON statement )*
                    {
                    	PushFollow(FOLLOW_declaration_in_initialOperations3149);
                    	declaration244 = declaration();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( (state.backtracking==0) ) stream_declaration.Add(declaration244.Tree);
                    	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:530:16: ( ( SCOLON declaration )=> SCOLON declaration )*
                    	do 
                    	{
                    	    int alt62 = 2;
                    	    int LA62_0 = input.LA(1);

                    	    if ( (LA62_0 == SCOLON) )
                    	    {
                    	        int LA62_1 = input.LA(2);

                    	        if ( (synpred19_SimSharp()) )
                    	        {
                    	            alt62 = 1;
                    	        }


                    	    }


                    	    switch (alt62) 
                    		{
                    			case 1 :
                    			    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:530:17: ( SCOLON declaration )=> SCOLON declaration
                    			    {
                    			    	SCOLON245=(IToken)Match(input,SCOLON,FOLLOW_SCOLON_in_initialOperations3160); if (state.failed) return retval; 
                    			    	if ( (state.backtracking==0) ) stream_SCOLON.Add(SCOLON245);

                    			    	PushFollow(FOLLOW_declaration_in_initialOperations3162);
                    			    	declaration246 = declaration();
                    			    	state.followingStackPointer--;
                    			    	if (state.failed) return retval;
                    			    	if ( (state.backtracking==0) ) stream_declaration.Add(declaration246.Tree);

                    			    }
                    			    break;

                    			default:
                    			    goto loop62;
                    	    }
                    	} while (true);

                    	loop62:
                    		;	// Stops C# compiler whining that label 'loop62' has no statements

                    	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:530:62: ( ( SCOLON statement )=> SCOLON statement )*
                    	do 
                    	{
                    	    int alt63 = 2;
                    	    int LA63_0 = input.LA(1);

                    	    if ( (LA63_0 == SCOLON) )
                    	    {
                    	        int LA63_1 = input.LA(2);

                    	        if ( (synpred20_SimSharp()) )
                    	        {
                    	            alt63 = 1;
                    	        }


                    	    }


                    	    switch (alt63) 
                    		{
                    			case 1 :
                    			    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:530:63: ( SCOLON statement )=> SCOLON statement
                    			    {
                    			    	SCOLON247=(IToken)Match(input,SCOLON,FOLLOW_SCOLON_in_initialOperations3175); if (state.failed) return retval; 
                    			    	if ( (state.backtracking==0) ) stream_SCOLON.Add(SCOLON247);

                    			    	PushFollow(FOLLOW_statement_in_initialOperations3177);
                    			    	statement248 = statement();
                    			    	state.followingStackPointer--;
                    			    	if (state.failed) return retval;
                    			    	if ( (state.backtracking==0) ) stream_statement.Add(statement248.Tree);

                    			    }
                    			    break;

                    			default:
                    			    goto loop63;
                    	    }
                    	} while (true);

                    	loop63:
                    		;	// Stops C# compiler whining that label 'loop63' has no statements



                    	// AST REWRITE
                    	// elements:          declaration, statement
                    	// token labels:      
                    	// rule labels:       retval
                    	// token list labels: 
                    	// rule list labels:  
                    	// wildcard labels: 
                    	if ( (state.backtracking==0) ) {
                    	retval.Tree = root_0;
                    	RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval!=null ? retval.Tree : null);

                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();
                    	// 530:104: -> ^( Prolog ( declaration )* ( statement )* )
                    	{
                    	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:530:107: ^( Prolog ( declaration )* ( statement )* )
                    	    {
                    	    SimSharpTreeNode root_1 = (SimSharpTreeNode)adaptor.GetNilNode();
                    	    root_1 = (SimSharpTreeNode)adaptor.BecomeRoot((SimSharpTreeNode)adaptor.Create(Prolog, "Prolog"), root_1);

                    	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:530:116: ( declaration )*
                    	    while ( stream_declaration.HasNext() )
                    	    {
                    	        adaptor.AddChild(root_1, stream_declaration.NextTree());

                    	    }
                    	    stream_declaration.Reset();
                    	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:530:129: ( statement )*
                    	    while ( stream_statement.HasNext() )
                    	    {
                    	        adaptor.AddChild(root_1, stream_statement.NextTree());

                    	    }
                    	    stream_statement.Reset();

                    	    adaptor.AddChild(root_0, root_1);
                    	    }

                    	}

                    	retval.Tree = root_0;retval.Tree = root_0;}
                    }
                    break;

            }
            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "initialOperations"

    public class finalOperations_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "finalOperations"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:535:1: finalOperations : INNER SCOLON statement ( SCOLON statement )* -> ^( Epilog ( statement )* ) ;
    public SimSharpParser.finalOperations_return finalOperations() // throws RecognitionException [1]
    {   
        SimSharpParser.finalOperations_return retval = new SimSharpParser.finalOperations_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken INNER249 = null;
        IToken SCOLON250 = null;
        IToken SCOLON252 = null;
        SimSharpParser.statement_return statement251 = default(SimSharpParser.statement_return);

        SimSharpParser.statement_return statement253 = default(SimSharpParser.statement_return);


        SimSharpTreeNode INNER249_tree=null;
        SimSharpTreeNode SCOLON250_tree=null;
        SimSharpTreeNode SCOLON252_tree=null;
        RewriteRuleTokenStream stream_INNER = new RewriteRuleTokenStream(adaptor,"token INNER");
        RewriteRuleTokenStream stream_SCOLON = new RewriteRuleTokenStream(adaptor,"token SCOLON");
        RewriteRuleSubtreeStream stream_statement = new RewriteRuleSubtreeStream(adaptor,"rule statement");
        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:536:2: ( INNER SCOLON statement ( SCOLON statement )* -> ^( Epilog ( statement )* ) )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:536:4: INNER SCOLON statement ( SCOLON statement )*
            {
            	INNER249=(IToken)Match(input,INNER,FOLLOW_INNER_in_finalOperations3206); if (state.failed) return retval; 
            	if ( (state.backtracking==0) ) stream_INNER.Add(INNER249);

            	SCOLON250=(IToken)Match(input,SCOLON,FOLLOW_SCOLON_in_finalOperations3208); if (state.failed) return retval; 
            	if ( (state.backtracking==0) ) stream_SCOLON.Add(SCOLON250);

            	PushFollow(FOLLOW_statement_in_finalOperations3210);
            	statement251 = statement();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( (state.backtracking==0) ) stream_statement.Add(statement251.Tree);
            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:536:27: ( SCOLON statement )*
            	do 
            	{
            	    int alt65 = 2;
            	    int LA65_0 = input.LA(1);

            	    if ( (LA65_0 == SCOLON) )
            	    {
            	        alt65 = 1;
            	    }


            	    switch (alt65) 
            		{
            			case 1 :
            			    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:536:28: SCOLON statement
            			    {
            			    	SCOLON252=(IToken)Match(input,SCOLON,FOLLOW_SCOLON_in_finalOperations3213); if (state.failed) return retval; 
            			    	if ( (state.backtracking==0) ) stream_SCOLON.Add(SCOLON252);

            			    	PushFollow(FOLLOW_statement_in_finalOperations3215);
            			    	statement253 = statement();
            			    	state.followingStackPointer--;
            			    	if (state.failed) return retval;
            			    	if ( (state.backtracking==0) ) stream_statement.Add(statement253.Tree);

            			    }
            			    break;

            			default:
            			    goto loop65;
            	    }
            	} while (true);

            	loop65:
            		;	// Stops C# compiler whining that label 'loop65' has no statements



            	// AST REWRITE
            	// elements:          statement
            	// token labels:      
            	// rule labels:       retval
            	// token list labels: 
            	// rule list labels:  
            	// wildcard labels: 
            	if ( (state.backtracking==0) ) {
            	retval.Tree = root_0;
            	RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval!=null ? retval.Tree : null);

            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();
            	// 536:47: -> ^( Epilog ( statement )* )
            	{
            	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:536:50: ^( Epilog ( statement )* )
            	    {
            	    SimSharpTreeNode root_1 = (SimSharpTreeNode)adaptor.GetNilNode();
            	    root_1 = (SimSharpTreeNode)adaptor.BecomeRoot((SimSharpTreeNode)adaptor.Create(Epilog, "Epilog"), root_1);

            	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:536:59: ( statement )*
            	    while ( stream_statement.HasNext() )
            	    {
            	        adaptor.AddChild(root_1, stream_statement.NextTree());

            	    }
            	    stream_statement.Reset();

            	    adaptor.AddChild(root_0, root_1);
            	    }

            	}

            	retval.Tree = root_0;retval.Tree = root_0;}
            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "finalOperations"

    public class virtualPart_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "virtualPart"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:539:1: virtualPart : VIRTUAL COLON virtualSpec SCOLON ( virtualSpec SCOLON )* ;
    public SimSharpParser.virtualPart_return virtualPart() // throws RecognitionException [1]
    {   
        SimSharpParser.virtualPart_return retval = new SimSharpParser.virtualPart_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken VIRTUAL254 = null;
        IToken COLON255 = null;
        IToken SCOLON257 = null;
        IToken SCOLON259 = null;
        SimSharpParser.virtualSpec_return virtualSpec256 = default(SimSharpParser.virtualSpec_return);

        SimSharpParser.virtualSpec_return virtualSpec258 = default(SimSharpParser.virtualSpec_return);


        SimSharpTreeNode VIRTUAL254_tree=null;
        SimSharpTreeNode COLON255_tree=null;
        SimSharpTreeNode SCOLON257_tree=null;
        SimSharpTreeNode SCOLON259_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:540:2: ( VIRTUAL COLON virtualSpec SCOLON ( virtualSpec SCOLON )* )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:540:4: VIRTUAL COLON virtualSpec SCOLON ( virtualSpec SCOLON )*
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	VIRTUAL254=(IToken)Match(input,VIRTUAL,FOLLOW_VIRTUAL_in_virtualPart3237); if (state.failed) return retval;
            	if ( state.backtracking == 0 )
            	{VIRTUAL254_tree = (SimSharpTreeNode)adaptor.Create(VIRTUAL254);
            		adaptor.AddChild(root_0, VIRTUAL254_tree);
            	}
            	COLON255=(IToken)Match(input,COLON,FOLLOW_COLON_in_virtualPart3239); if (state.failed) return retval;
            	if ( state.backtracking == 0 )
            	{COLON255_tree = (SimSharpTreeNode)adaptor.Create(COLON255);
            		adaptor.AddChild(root_0, COLON255_tree);
            	}
            	PushFollow(FOLLOW_virtualSpec_in_virtualPart3241);
            	virtualSpec256 = virtualSpec();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, virtualSpec256.Tree);
            	SCOLON257=(IToken)Match(input,SCOLON,FOLLOW_SCOLON_in_virtualPart3243); if (state.failed) return retval;
            	if ( state.backtracking == 0 )
            	{SCOLON257_tree = (SimSharpTreeNode)adaptor.Create(SCOLON257);
            		adaptor.AddChild(root_0, SCOLON257_tree);
            	}
            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:540:37: ( virtualSpec SCOLON )*
            	do 
            	{
            	    int alt66 = 2;
            	    int LA66_0 = input.LA(1);

            	    if ( (LA66_0 == PROCEDURE || (LA66_0 >= SWITCH && LA66_0 <= LABEL) || (LA66_0 >= BOOLEAN && LA66_0 <= REF)) )
            	    {
            	        alt66 = 1;
            	    }


            	    switch (alt66) 
            		{
            			case 1 :
            			    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:540:39: virtualSpec SCOLON
            			    {
            			    	PushFollow(FOLLOW_virtualSpec_in_virtualPart3247);
            			    	virtualSpec258 = virtualSpec();
            			    	state.followingStackPointer--;
            			    	if (state.failed) return retval;
            			    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, virtualSpec258.Tree);
            			    	SCOLON259=(IToken)Match(input,SCOLON,FOLLOW_SCOLON_in_virtualPart3249); if (state.failed) return retval;
            			    	if ( state.backtracking == 0 )
            			    	{SCOLON259_tree = (SimSharpTreeNode)adaptor.Create(SCOLON259);
            			    		adaptor.AddChild(root_0, SCOLON259_tree);
            			    	}

            			    }
            			    break;

            			default:
            			    goto loop66;
            	    }
            	} while (true);

            	loop66:
            		;	// Stops C# compiler whining that label 'loop66' has no statements


            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "virtualPart"

    public class virtualSpec_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "virtualSpec"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:543:1: virtualSpec : ( specifier identifierList | PROCEDURE procedureIdentifier procedureSpecification );
    public SimSharpParser.virtualSpec_return virtualSpec() // throws RecognitionException [1]
    {   
        SimSharpParser.virtualSpec_return retval = new SimSharpParser.virtualSpec_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken PROCEDURE262 = null;
        SimSharpParser.specifier_return specifier260 = default(SimSharpParser.specifier_return);

        SimSharpParser.identifierList_return identifierList261 = default(SimSharpParser.identifierList_return);

        SimSharpParser.procedureIdentifier_return procedureIdentifier263 = default(SimSharpParser.procedureIdentifier_return);

        SimSharpParser.procedureSpecification_return procedureSpecification264 = default(SimSharpParser.procedureSpecification_return);


        SimSharpTreeNode PROCEDURE262_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:544:2: ( specifier identifierList | PROCEDURE procedureIdentifier procedureSpecification )
            int alt67 = 2;
            int LA67_0 = input.LA(1);

            if ( ((LA67_0 >= SWITCH && LA67_0 <= LABEL) || (LA67_0 >= BOOLEAN && LA67_0 <= REF)) )
            {
                alt67 = 1;
            }
            else if ( (LA67_0 == PROCEDURE) )
            {
                alt67 = 2;
            }
            else 
            {
                if ( state.backtracking > 0 ) {state.failed = true; return retval;}
                NoViableAltException nvae_d67s0 =
                    new NoViableAltException("", 67, 0, input);

                throw nvae_d67s0;
            }
            switch (alt67) 
            {
                case 1 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:544:4: specifier identifierList
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	PushFollow(FOLLOW_specifier_in_virtualSpec3263);
                    	specifier260 = specifier();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, specifier260.Tree);
                    	PushFollow(FOLLOW_identifierList_in_virtualSpec3265);
                    	identifierList261 = identifierList();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, identifierList261.Tree);

                    }
                    break;
                case 2 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:545:4: PROCEDURE procedureIdentifier procedureSpecification
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	PROCEDURE262=(IToken)Match(input,PROCEDURE,FOLLOW_PROCEDURE_in_virtualSpec3270); if (state.failed) return retval;
                    	if ( state.backtracking == 0 )
                    	{PROCEDURE262_tree = (SimSharpTreeNode)adaptor.Create(PROCEDURE262);
                    		adaptor.AddChild(root_0, PROCEDURE262_tree);
                    	}
                    	PushFollow(FOLLOW_procedureIdentifier_in_virtualSpec3272);
                    	procedureIdentifier263 = procedureIdentifier();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, procedureIdentifier263.Tree);
                    	PushFollow(FOLLOW_procedureSpecification_in_virtualSpec3274);
                    	procedureSpecification264 = procedureSpecification();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, procedureSpecification264.Tree);

                    }
                    break;

            }
            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "virtualSpec"

    public class protectionPart_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "protectionPart"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:548:1: protectionPart : protectionSpecification ( ( SCOLON ( HIDDEN | PROTECTED ) )=> SCOLON protectionSpecification )* ;
    public SimSharpParser.protectionPart_return protectionPart() // throws RecognitionException [1]
    {   
        SimSharpParser.protectionPart_return retval = new SimSharpParser.protectionPart_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken SCOLON266 = null;
        SimSharpParser.protectionSpecification_return protectionSpecification265 = default(SimSharpParser.protectionSpecification_return);

        SimSharpParser.protectionSpecification_return protectionSpecification267 = default(SimSharpParser.protectionSpecification_return);


        SimSharpTreeNode SCOLON266_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:549:2: ( protectionSpecification ( ( SCOLON ( HIDDEN | PROTECTED ) )=> SCOLON protectionSpecification )* )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:549:4: protectionSpecification ( ( SCOLON ( HIDDEN | PROTECTED ) )=> SCOLON protectionSpecification )*
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	PushFollow(FOLLOW_protectionSpecification_in_protectionPart3285);
            	protectionSpecification265 = protectionSpecification();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, protectionSpecification265.Tree);
            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:549:28: ( ( SCOLON ( HIDDEN | PROTECTED ) )=> SCOLON protectionSpecification )*
            	do 
            	{
            	    int alt68 = 2;
            	    int LA68_0 = input.LA(1);

            	    if ( (LA68_0 == SCOLON) )
            	    {
            	        int LA68_1 = input.LA(2);

            	        if ( (synpred21_SimSharp()) )
            	        {
            	            alt68 = 1;
            	        }


            	    }


            	    switch (alt68) 
            		{
            			case 1 :
            			    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:549:30: ( SCOLON ( HIDDEN | PROTECTED ) )=> SCOLON protectionSpecification
            			    {
            			    	SCOLON266=(IToken)Match(input,SCOLON,FOLLOW_SCOLON_in_protectionPart3301); if (state.failed) return retval;
            			    	if ( state.backtracking == 0 )
            			    	{SCOLON266_tree = (SimSharpTreeNode)adaptor.Create(SCOLON266);
            			    		adaptor.AddChild(root_0, SCOLON266_tree);
            			    	}
            			    	PushFollow(FOLLOW_protectionSpecification_in_protectionPart3303);
            			    	protectionSpecification267 = protectionSpecification();
            			    	state.followingStackPointer--;
            			    	if (state.failed) return retval;
            			    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, protectionSpecification267.Tree);

            			    }
            			    break;

            			default:
            			    goto loop68;
            	    }
            	} while (true);

            	loop68:
            		;	// Stops C# compiler whining that label 'loop68' has no statements


            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "protectionPart"

    public class protectionSpecification_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "protectionSpecification"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:552:1: protectionSpecification options {k=2; } : ( HIDDEN identifierList | PROTECTED identifierList | HIDDEN PROTECTED identifierList | PROTECTED HIDDEN identifierList );
    public SimSharpParser.protectionSpecification_return protectionSpecification() // throws RecognitionException [1]
    {   
        SimSharpParser.protectionSpecification_return retval = new SimSharpParser.protectionSpecification_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken HIDDEN268 = null;
        IToken PROTECTED270 = null;
        IToken HIDDEN272 = null;
        IToken PROTECTED273 = null;
        IToken PROTECTED275 = null;
        IToken HIDDEN276 = null;
        SimSharpParser.identifierList_return identifierList269 = default(SimSharpParser.identifierList_return);

        SimSharpParser.identifierList_return identifierList271 = default(SimSharpParser.identifierList_return);

        SimSharpParser.identifierList_return identifierList274 = default(SimSharpParser.identifierList_return);

        SimSharpParser.identifierList_return identifierList277 = default(SimSharpParser.identifierList_return);


        SimSharpTreeNode HIDDEN268_tree=null;
        SimSharpTreeNode PROTECTED270_tree=null;
        SimSharpTreeNode HIDDEN272_tree=null;
        SimSharpTreeNode PROTECTED273_tree=null;
        SimSharpTreeNode PROTECTED275_tree=null;
        SimSharpTreeNode HIDDEN276_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:554:2: ( HIDDEN identifierList | PROTECTED identifierList | HIDDEN PROTECTED identifierList | PROTECTED HIDDEN identifierList )
            int alt69 = 4;
            int LA69_0 = input.LA(1);

            if ( (LA69_0 == HIDDEN) )
            {
                int LA69_1 = input.LA(2);

                if ( (LA69_1 == PROTECTED) )
                {
                    alt69 = 3;
                }
                else if ( (LA69_1 == ID) )
                {
                    alt69 = 1;
                }
                else 
                {
                    if ( state.backtracking > 0 ) {state.failed = true; return retval;}
                    NoViableAltException nvae_d69s1 =
                        new NoViableAltException("", 69, 1, input);

                    throw nvae_d69s1;
                }
            }
            else if ( (LA69_0 == PROTECTED) )
            {
                int LA69_2 = input.LA(2);

                if ( (LA69_2 == HIDDEN) )
                {
                    alt69 = 4;
                }
                else if ( (LA69_2 == ID) )
                {
                    alt69 = 2;
                }
                else 
                {
                    if ( state.backtracking > 0 ) {state.failed = true; return retval;}
                    NoViableAltException nvae_d69s2 =
                        new NoViableAltException("", 69, 2, input);

                    throw nvae_d69s2;
                }
            }
            else 
            {
                if ( state.backtracking > 0 ) {state.failed = true; return retval;}
                NoViableAltException nvae_d69s0 =
                    new NoViableAltException("", 69, 0, input);

                throw nvae_d69s0;
            }
            switch (alt69) 
            {
                case 1 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:554:4: HIDDEN identifierList
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	HIDDEN268=(IToken)Match(input,HIDDEN,FOLLOW_HIDDEN_in_protectionSpecification3327); if (state.failed) return retval;
                    	if ( state.backtracking == 0 )
                    	{HIDDEN268_tree = (SimSharpTreeNode)adaptor.Create(HIDDEN268);
                    		adaptor.AddChild(root_0, HIDDEN268_tree);
                    	}
                    	PushFollow(FOLLOW_identifierList_in_protectionSpecification3329);
                    	identifierList269 = identifierList();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, identifierList269.Tree);

                    }
                    break;
                case 2 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:555:11: PROTECTED identifierList
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	PROTECTED270=(IToken)Match(input,PROTECTED,FOLLOW_PROTECTED_in_protectionSpecification3342); if (state.failed) return retval;
                    	if ( state.backtracking == 0 )
                    	{PROTECTED270_tree = (SimSharpTreeNode)adaptor.Create(PROTECTED270);
                    		adaptor.AddChild(root_0, PROTECTED270_tree);
                    	}
                    	PushFollow(FOLLOW_identifierList_in_protectionSpecification3344);
                    	identifierList271 = identifierList();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, identifierList271.Tree);

                    }
                    break;
                case 3 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:556:39: HIDDEN PROTECTED identifierList
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	HIDDEN272=(IToken)Match(input,HIDDEN,FOLLOW_HIDDEN_in_protectionSpecification3359); if (state.failed) return retval;
                    	if ( state.backtracking == 0 )
                    	{HIDDEN272_tree = (SimSharpTreeNode)adaptor.Create(HIDDEN272);
                    		adaptor.AddChild(root_0, HIDDEN272_tree);
                    	}
                    	PROTECTED273=(IToken)Match(input,PROTECTED,FOLLOW_PROTECTED_in_protectionSpecification3361); if (state.failed) return retval;
                    	if ( state.backtracking == 0 )
                    	{PROTECTED273_tree = (SimSharpTreeNode)adaptor.Create(PROTECTED273);
                    		adaptor.AddChild(root_0, PROTECTED273_tree);
                    	}
                    	PushFollow(FOLLOW_identifierList_in_protectionSpecification3363);
                    	identifierList274 = identifierList();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, identifierList274.Tree);

                    }
                    break;
                case 4 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:557:39: PROTECTED HIDDEN identifierList
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	PROTECTED275=(IToken)Match(input,PROTECTED,FOLLOW_PROTECTED_in_protectionSpecification3377); if (state.failed) return retval;
                    	if ( state.backtracking == 0 )
                    	{PROTECTED275_tree = (SimSharpTreeNode)adaptor.Create(PROTECTED275);
                    		adaptor.AddChild(root_0, PROTECTED275_tree);
                    	}
                    	HIDDEN276=(IToken)Match(input,HIDDEN,FOLLOW_HIDDEN_in_protectionSpecification3379); if (state.failed) return retval;
                    	if ( state.backtracking == 0 )
                    	{HIDDEN276_tree = (SimSharpTreeNode)adaptor.Create(HIDDEN276);
                    		adaptor.AddChild(root_0, HIDDEN276_tree);
                    	}
                    	PushFollow(FOLLOW_identifierList_in_protectionSpecification3381);
                    	identifierList277 = identifierList();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, identifierList277.Tree);

                    }
                    break;

            }
            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "protectionSpecification"

    public class constantElement_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "constantElement"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:560:1: constantElement : ID EQ expression -> ^( ConstElement ID expression ) ;
    public SimSharpParser.constantElement_return constantElement() // throws RecognitionException [1]
    {   
        SimSharpParser.constantElement_return retval = new SimSharpParser.constantElement_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken ID278 = null;
        IToken EQ279 = null;
        SimSharpParser.expression_return expression280 = default(SimSharpParser.expression_return);


        SimSharpTreeNode ID278_tree=null;
        SimSharpTreeNode EQ279_tree=null;
        RewriteRuleTokenStream stream_EQ = new RewriteRuleTokenStream(adaptor,"token EQ");
        RewriteRuleTokenStream stream_ID = new RewriteRuleTokenStream(adaptor,"token ID");
        RewriteRuleSubtreeStream stream_expression = new RewriteRuleSubtreeStream(adaptor,"rule expression");
        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:561:4: ( ID EQ expression -> ^( ConstElement ID expression ) )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:561:6: ID EQ expression
            {
            	ID278=(IToken)Match(input,ID,FOLLOW_ID_in_constantElement3394); if (state.failed) return retval; 
            	if ( (state.backtracking==0) ) stream_ID.Add(ID278);

            	EQ279=(IToken)Match(input,EQ,FOLLOW_EQ_in_constantElement3396); if (state.failed) return retval; 
            	if ( (state.backtracking==0) ) stream_EQ.Add(EQ279);

            	PushFollow(FOLLOW_expression_in_constantElement3398);
            	expression280 = expression();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( (state.backtracking==0) ) stream_expression.Add(expression280.Tree);


            	// AST REWRITE
            	// elements:          ID, expression
            	// token labels:      
            	// rule labels:       retval
            	// token list labels: 
            	// rule list labels:  
            	// wildcard labels: 
            	if ( (state.backtracking==0) ) {
            	retval.Tree = root_0;
            	RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval!=null ? retval.Tree : null);

            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();
            	// 561:23: -> ^( ConstElement ID expression )
            	{
            	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:561:26: ^( ConstElement ID expression )
            	    {
            	    SimSharpTreeNode root_1 = (SimSharpTreeNode)adaptor.GetNilNode();
            	    root_1 = (SimSharpTreeNode)adaptor.BecomeRoot((SimSharpTreeNode)adaptor.Create(ConstElement, "ConstElement"), root_1);

            	    adaptor.AddChild(root_1, stream_ID.NextNode());
            	    adaptor.AddChild(root_1, stream_expression.NextTree());

            	    adaptor.AddChild(root_0, root_1);
            	    }

            	}

            	retval.Tree = root_0;retval.Tree = root_0;}
            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "constantElement"

    public class expression_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "expression"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:570:1: expression : ( simpleExpression | ifClause simpleExpression ELSE expression );
    public SimSharpParser.expression_return expression() // throws RecognitionException [1]
    {   
        SimSharpParser.expression_return retval = new SimSharpParser.expression_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken ELSE284 = null;
        SimSharpParser.simpleExpression_return simpleExpression281 = default(SimSharpParser.simpleExpression_return);

        SimSharpParser.ifClause_return ifClause282 = default(SimSharpParser.ifClause_return);

        SimSharpParser.simpleExpression_return simpleExpression283 = default(SimSharpParser.simpleExpression_return);

        SimSharpParser.expression_return expression285 = default(SimSharpParser.expression_return);


        SimSharpTreeNode ELSE284_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:571:2: ( simpleExpression | ifClause simpleExpression ELSE expression )
            int alt70 = 2;
            alt70 = dfa70.Predict(input);
            switch (alt70) 
            {
                case 1 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:571:4: simpleExpression
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	PushFollow(FOLLOW_simpleExpression_in_expression3425);
                    	simpleExpression281 = simpleExpression();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, simpleExpression281.Tree);

                    }
                    break;
                case 2 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:572:4: ifClause simpleExpression ELSE expression
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	PushFollow(FOLLOW_ifClause_in_expression3430);
                    	ifClause282 = ifClause();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, ifClause282.Tree);
                    	PushFollow(FOLLOW_simpleExpression_in_expression3432);
                    	simpleExpression283 = simpleExpression();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, simpleExpression283.Tree);
                    	ELSE284=(IToken)Match(input,ELSE,FOLLOW_ELSE_in_expression3434); if (state.failed) return retval;
                    	if ( state.backtracking == 0 )
                    	{ELSE284_tree = (SimSharpTreeNode)adaptor.Create(ELSE284);
                    		adaptor.AddChild(root_0, ELSE284_tree);
                    	}
                    	PushFollow(FOLLOW_expression_in_expression3436);
                    	expression285 = expression();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, expression285.Tree);

                    }
                    break;

            }
            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "expression"

    public class designationalExpression_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "designationalExpression"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:575:1: designationalExpression : ( ( ID LPAR )=> ID LPAR subscriptExpression RPAR -> ^( SwitchDesignator ID subscriptExpression ) | ID -> ^( LabelDesignator ID ) );
    public SimSharpParser.designationalExpression_return designationalExpression() // throws RecognitionException [1]
    {   
        SimSharpParser.designationalExpression_return retval = new SimSharpParser.designationalExpression_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken ID286 = null;
        IToken LPAR287 = null;
        IToken RPAR289 = null;
        IToken ID290 = null;
        SimSharpParser.subscriptExpression_return subscriptExpression288 = default(SimSharpParser.subscriptExpression_return);


        SimSharpTreeNode ID286_tree=null;
        SimSharpTreeNode LPAR287_tree=null;
        SimSharpTreeNode RPAR289_tree=null;
        SimSharpTreeNode ID290_tree=null;
        RewriteRuleTokenStream stream_RPAR = new RewriteRuleTokenStream(adaptor,"token RPAR");
        RewriteRuleTokenStream stream_LPAR = new RewriteRuleTokenStream(adaptor,"token LPAR");
        RewriteRuleTokenStream stream_ID = new RewriteRuleTokenStream(adaptor,"token ID");
        RewriteRuleSubtreeStream stream_subscriptExpression = new RewriteRuleSubtreeStream(adaptor,"rule subscriptExpression");
        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:576:2: ( ( ID LPAR )=> ID LPAR subscriptExpression RPAR -> ^( SwitchDesignator ID subscriptExpression ) | ID -> ^( LabelDesignator ID ) )
            int alt71 = 2;
            int LA71_0 = input.LA(1);

            if ( (LA71_0 == ID) )
            {
                int LA71_1 = input.LA(2);

                if ( (synpred22_SimSharp()) )
                {
                    alt71 = 1;
                }
                else if ( (true) )
                {
                    alt71 = 2;
                }
                else 
                {
                    if ( state.backtracking > 0 ) {state.failed = true; return retval;}
                    NoViableAltException nvae_d71s1 =
                        new NoViableAltException("", 71, 1, input);

                    throw nvae_d71s1;
                }
            }
            else 
            {
                if ( state.backtracking > 0 ) {state.failed = true; return retval;}
                NoViableAltException nvae_d71s0 =
                    new NoViableAltException("", 71, 0, input);

                throw nvae_d71s0;
            }
            switch (alt71) 
            {
                case 1 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:576:4: ( ID LPAR )=> ID LPAR subscriptExpression RPAR
                    {
                    	ID286=(IToken)Match(input,ID,FOLLOW_ID_in_designationalExpression3455); if (state.failed) return retval; 
                    	if ( (state.backtracking==0) ) stream_ID.Add(ID286);

                    	LPAR287=(IToken)Match(input,LPAR,FOLLOW_LPAR_in_designationalExpression3457); if (state.failed) return retval; 
                    	if ( (state.backtracking==0) ) stream_LPAR.Add(LPAR287);

                    	PushFollow(FOLLOW_subscriptExpression_in_designationalExpression3459);
                    	subscriptExpression288 = subscriptExpression();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( (state.backtracking==0) ) stream_subscriptExpression.Add(subscriptExpression288.Tree);
                    	RPAR289=(IToken)Match(input,RPAR,FOLLOW_RPAR_in_designationalExpression3461); if (state.failed) return retval; 
                    	if ( (state.backtracking==0) ) stream_RPAR.Add(RPAR289);



                    	// AST REWRITE
                    	// elements:          ID, subscriptExpression
                    	// token labels:      
                    	// rule labels:       retval
                    	// token list labels: 
                    	// rule list labels:  
                    	// wildcard labels: 
                    	if ( (state.backtracking==0) ) {
                    	retval.Tree = root_0;
                    	RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval!=null ? retval.Tree : null);

                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();
                    	// 576:50: -> ^( SwitchDesignator ID subscriptExpression )
                    	{
                    	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:576:53: ^( SwitchDesignator ID subscriptExpression )
                    	    {
                    	    SimSharpTreeNode root_1 = (SimSharpTreeNode)adaptor.GetNilNode();
                    	    root_1 = (SimSharpTreeNode)adaptor.BecomeRoot((SimSharpTreeNode)adaptor.Create(SwitchDesignator, "SwitchDesignator"), root_1);

                    	    adaptor.AddChild(root_1, stream_ID.NextNode());
                    	    adaptor.AddChild(root_1, stream_subscriptExpression.NextTree());

                    	    adaptor.AddChild(root_0, root_1);
                    	    }

                    	}

                    	retval.Tree = root_0;retval.Tree = root_0;}
                    }
                    break;
                case 2 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:577:4: ID
                    {
                    	ID290=(IToken)Match(input,ID,FOLLOW_ID_in_designationalExpression3476); if (state.failed) return retval; 
                    	if ( (state.backtracking==0) ) stream_ID.Add(ID290);



                    	// AST REWRITE
                    	// elements:          ID
                    	// token labels:      
                    	// rule labels:       retval
                    	// token list labels: 
                    	// rule list labels:  
                    	// wildcard labels: 
                    	if ( (state.backtracking==0) ) {
                    	retval.Tree = root_0;
                    	RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval!=null ? retval.Tree : null);

                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();
                    	// 577:7: -> ^( LabelDesignator ID )
                    	{
                    	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:577:10: ^( LabelDesignator ID )
                    	    {
                    	    SimSharpTreeNode root_1 = (SimSharpTreeNode)adaptor.GetNilNode();
                    	    root_1 = (SimSharpTreeNode)adaptor.BecomeRoot((SimSharpTreeNode)adaptor.Create(LabelDesignator, "LabelDesignator"), root_1);

                    	    adaptor.AddChild(root_1, stream_ID.NextNode());

                    	    adaptor.AddChild(root_0, root_1);
                    	    }

                    	}

                    	retval.Tree = root_0;retval.Tree = root_0;}
                    }
                    break;

            }
            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "designationalExpression"

    public class booleanExpression_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "booleanExpression"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:580:1: booleanExpression : expression ;
    public SimSharpParser.booleanExpression_return booleanExpression() // throws RecognitionException [1]
    {   
        SimSharpParser.booleanExpression_return retval = new SimSharpParser.booleanExpression_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        SimSharpParser.expression_return expression291 = default(SimSharpParser.expression_return);



        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:581:2: ( expression )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:581:4: expression
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	PushFollow(FOLLOW_expression_in_booleanExpression3495);
            	expression291 = expression();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, expression291.Tree);

            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "booleanExpression"

    public class arithmeticExpression_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "arithmeticExpression"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:584:1: arithmeticExpression : expression ;
    public SimSharpParser.arithmeticExpression_return arithmeticExpression() // throws RecognitionException [1]
    {   
        SimSharpParser.arithmeticExpression_return retval = new SimSharpParser.arithmeticExpression_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        SimSharpParser.expression_return expression292 = default(SimSharpParser.expression_return);



        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:585:2: ( expression )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:585:4: expression
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	PushFollow(FOLLOW_expression_in_arithmeticExpression3507);
            	expression292 = expression();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, expression292.Tree);

            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "arithmeticExpression"

    public class objectExpression_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "objectExpression"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:588:1: objectExpression : expression ;
    public SimSharpParser.objectExpression_return objectExpression() // throws RecognitionException [1]
    {   
        SimSharpParser.objectExpression_return retval = new SimSharpParser.objectExpression_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        SimSharpParser.expression_return expression293 = default(SimSharpParser.expression_return);



        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:589:2: ( expression )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:589:4: expression
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	PushFollow(FOLLOW_expression_in_objectExpression3519);
            	expression293 = expression();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, expression293.Tree);

            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "objectExpression"

    public class textExpression_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "textExpression"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:592:1: textExpression : expression ;
    public SimSharpParser.textExpression_return textExpression() // throws RecognitionException [1]
    {   
        SimSharpParser.textExpression_return retval = new SimSharpParser.textExpression_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        SimSharpParser.expression_return expression294 = default(SimSharpParser.expression_return);



        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:593:2: ( expression )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:593:4: expression
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	PushFollow(FOLLOW_expression_in_textExpression3531);
            	expression294 = expression();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, expression294.Tree);

            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "textExpression"

    public class simpleTextExpression_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "simpleTextExpression"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:596:1: simpleTextExpression : simpleExpression ;
    public SimSharpParser.simpleTextExpression_return simpleTextExpression() // throws RecognitionException [1]
    {   
        SimSharpParser.simpleTextExpression_return retval = new SimSharpParser.simpleTextExpression_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        SimSharpParser.simpleExpression_return simpleExpression295 = default(SimSharpParser.simpleExpression_return);



        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:597:2: ( simpleExpression )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:597:4: simpleExpression
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	PushFollow(FOLLOW_simpleExpression_in_simpleTextExpression3544);
            	simpleExpression295 = simpleExpression();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, simpleExpression295.Tree);

            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "simpleTextExpression"

    public class simpleExpression_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "simpleExpression"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:600:1: simpleExpression : conditionalExpression ;
    public SimSharpParser.simpleExpression_return simpleExpression() // throws RecognitionException [1]
    {   
        SimSharpParser.simpleExpression_return retval = new SimSharpParser.simpleExpression_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        SimSharpParser.conditionalExpression_return conditionalExpression296 = default(SimSharpParser.conditionalExpression_return);



        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:601:2: ( conditionalExpression )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:601:4: conditionalExpression
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	PushFollow(FOLLOW_conditionalExpression_in_simpleExpression3556);
            	conditionalExpression296 = conditionalExpression();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, conditionalExpression296.Tree);

            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "simpleExpression"

    public class subscriptExpression_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "subscriptExpression"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:604:1: subscriptExpression : arithmeticExpression ;
    public SimSharpParser.subscriptExpression_return subscriptExpression() // throws RecognitionException [1]
    {   
        SimSharpParser.subscriptExpression_return retval = new SimSharpParser.subscriptExpression_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        SimSharpParser.arithmeticExpression_return arithmeticExpression297 = default(SimSharpParser.arithmeticExpression_return);



        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:605:2: ( arithmeticExpression )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:605:4: arithmeticExpression
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	PushFollow(FOLLOW_arithmeticExpression_in_subscriptExpression3567);
            	arithmeticExpression297 = arithmeticExpression();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, arithmeticExpression297.Tree);

            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "subscriptExpression"

    public class conditionalExpression_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "conditionalExpression"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:608:1: conditionalExpression : ( ( booleanTertiary OR ELSE )=> booleanTertiary ( ( OR ELSE ) conditionalExpression ) -> ^( OrElse booleanTertiary conditionalExpression ) | booleanTertiary );
    public SimSharpParser.conditionalExpression_return conditionalExpression() // throws RecognitionException [1]
    {   
        SimSharpParser.conditionalExpression_return retval = new SimSharpParser.conditionalExpression_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken OR299 = null;
        IToken ELSE300 = null;
        SimSharpParser.booleanTertiary_return booleanTertiary298 = default(SimSharpParser.booleanTertiary_return);

        SimSharpParser.conditionalExpression_return conditionalExpression301 = default(SimSharpParser.conditionalExpression_return);

        SimSharpParser.booleanTertiary_return booleanTertiary302 = default(SimSharpParser.booleanTertiary_return);


        SimSharpTreeNode OR299_tree=null;
        SimSharpTreeNode ELSE300_tree=null;
        RewriteRuleTokenStream stream_OR = new RewriteRuleTokenStream(adaptor,"token OR");
        RewriteRuleTokenStream stream_ELSE = new RewriteRuleTokenStream(adaptor,"token ELSE");
        RewriteRuleSubtreeStream stream_booleanTertiary = new RewriteRuleSubtreeStream(adaptor,"rule booleanTertiary");
        RewriteRuleSubtreeStream stream_conditionalExpression = new RewriteRuleSubtreeStream(adaptor,"rule conditionalExpression");
        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:609:2: ( ( booleanTertiary OR ELSE )=> booleanTertiary ( ( OR ELSE ) conditionalExpression ) -> ^( OrElse booleanTertiary conditionalExpression ) | booleanTertiary )
            int alt72 = 2;
            alt72 = dfa72.Predict(input);
            switch (alt72) 
            {
                case 1 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:609:4: ( booleanTertiary OR ELSE )=> booleanTertiary ( ( OR ELSE ) conditionalExpression )
                    {
                    	PushFollow(FOLLOW_booleanTertiary_in_conditionalExpression3588);
                    	booleanTertiary298 = booleanTertiary();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( (state.backtracking==0) ) stream_booleanTertiary.Add(booleanTertiary298.Tree);
                    	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:609:49: ( ( OR ELSE ) conditionalExpression )
                    	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:609:51: ( OR ELSE ) conditionalExpression
                    	{
                    		// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:609:51: ( OR ELSE )
                    		// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:609:52: OR ELSE
                    		{
                    			OR299=(IToken)Match(input,OR,FOLLOW_OR_in_conditionalExpression3593); if (state.failed) return retval; 
                    			if ( (state.backtracking==0) ) stream_OR.Add(OR299);

                    			ELSE300=(IToken)Match(input,ELSE,FOLLOW_ELSE_in_conditionalExpression3595); if (state.failed) return retval; 
                    			if ( (state.backtracking==0) ) stream_ELSE.Add(ELSE300);


                    		}

                    		PushFollow(FOLLOW_conditionalExpression_in_conditionalExpression3598);
                    		conditionalExpression301 = conditionalExpression();
                    		state.followingStackPointer--;
                    		if (state.failed) return retval;
                    		if ( (state.backtracking==0) ) stream_conditionalExpression.Add(conditionalExpression301.Tree);

                    	}



                    	// AST REWRITE
                    	// elements:          booleanTertiary, conditionalExpression
                    	// token labels:      
                    	// rule labels:       retval
                    	// token list labels: 
                    	// rule list labels:  
                    	// wildcard labels: 
                    	if ( (state.backtracking==0) ) {
                    	retval.Tree = root_0;
                    	RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval!=null ? retval.Tree : null);

                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();
                    	// 609:85: -> ^( OrElse booleanTertiary conditionalExpression )
                    	{
                    	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:609:88: ^( OrElse booleanTertiary conditionalExpression )
                    	    {
                    	    SimSharpTreeNode root_1 = (SimSharpTreeNode)adaptor.GetNilNode();
                    	    root_1 = (SimSharpTreeNode)adaptor.BecomeRoot((SimSharpTreeNode)adaptor.Create(OrElse, "OrElse"), root_1);

                    	    adaptor.AddChild(root_1, stream_booleanTertiary.NextTree());
                    	    adaptor.AddChild(root_1, stream_conditionalExpression.NextTree());

                    	    adaptor.AddChild(root_0, root_1);
                    	    }

                    	}

                    	retval.Tree = root_0;retval.Tree = root_0;}
                    }
                    break;
                case 2 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:610:4: booleanTertiary
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	PushFollow(FOLLOW_booleanTertiary_in_conditionalExpression3615);
                    	booleanTertiary302 = booleanTertiary();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, booleanTertiary302.Tree);

                    }
                    break;

            }
            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "conditionalExpression"

    public class booleanTertiary_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "booleanTertiary"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:613:1: booleanTertiary : ( ( equivalence AND THEN )=> equivalence ( ( AND THEN ) booleanTertiary ) -> ^( AndThen equivalence booleanTertiary ) | equivalence );
    public SimSharpParser.booleanTertiary_return booleanTertiary() // throws RecognitionException [1]
    {   
        SimSharpParser.booleanTertiary_return retval = new SimSharpParser.booleanTertiary_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken AND304 = null;
        IToken THEN305 = null;
        SimSharpParser.equivalence_return equivalence303 = default(SimSharpParser.equivalence_return);

        SimSharpParser.booleanTertiary_return booleanTertiary306 = default(SimSharpParser.booleanTertiary_return);

        SimSharpParser.equivalence_return equivalence307 = default(SimSharpParser.equivalence_return);


        SimSharpTreeNode AND304_tree=null;
        SimSharpTreeNode THEN305_tree=null;
        RewriteRuleTokenStream stream_THEN = new RewriteRuleTokenStream(adaptor,"token THEN");
        RewriteRuleTokenStream stream_AND = new RewriteRuleTokenStream(adaptor,"token AND");
        RewriteRuleSubtreeStream stream_equivalence = new RewriteRuleSubtreeStream(adaptor,"rule equivalence");
        RewriteRuleSubtreeStream stream_booleanTertiary = new RewriteRuleSubtreeStream(adaptor,"rule booleanTertiary");
        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:614:2: ( ( equivalence AND THEN )=> equivalence ( ( AND THEN ) booleanTertiary ) -> ^( AndThen equivalence booleanTertiary ) | equivalence )
            int alt73 = 2;
            alt73 = dfa73.Predict(input);
            switch (alt73) 
            {
                case 1 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:614:4: ( equivalence AND THEN )=> equivalence ( ( AND THEN ) booleanTertiary )
                    {
                    	PushFollow(FOLLOW_equivalence_in_booleanTertiary3637);
                    	equivalence303 = equivalence();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( (state.backtracking==0) ) stream_equivalence.Add(equivalence303.Tree);
                    	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:614:43: ( ( AND THEN ) booleanTertiary )
                    	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:614:45: ( AND THEN ) booleanTertiary
                    	{
                    		// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:614:45: ( AND THEN )
                    		// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:614:46: AND THEN
                    		{
                    			AND304=(IToken)Match(input,AND,FOLLOW_AND_in_booleanTertiary3643); if (state.failed) return retval; 
                    			if ( (state.backtracking==0) ) stream_AND.Add(AND304);

                    			THEN305=(IToken)Match(input,THEN,FOLLOW_THEN_in_booleanTertiary3645); if (state.failed) return retval; 
                    			if ( (state.backtracking==0) ) stream_THEN.Add(THEN305);


                    		}

                    		PushFollow(FOLLOW_booleanTertiary_in_booleanTertiary3648);
                    		booleanTertiary306 = booleanTertiary();
                    		state.followingStackPointer--;
                    		if (state.failed) return retval;
                    		if ( (state.backtracking==0) ) stream_booleanTertiary.Add(booleanTertiary306.Tree);

                    	}



                    	// AST REWRITE
                    	// elements:          equivalence, booleanTertiary
                    	// token labels:      
                    	// rule labels:       retval
                    	// token list labels: 
                    	// rule list labels:  
                    	// wildcard labels: 
                    	if ( (state.backtracking==0) ) {
                    	retval.Tree = root_0;
                    	RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval!=null ? retval.Tree : null);

                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();
                    	// 614:73: -> ^( AndThen equivalence booleanTertiary )
                    	{
                    	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:614:76: ^( AndThen equivalence booleanTertiary )
                    	    {
                    	    SimSharpTreeNode root_1 = (SimSharpTreeNode)adaptor.GetNilNode();
                    	    root_1 = (SimSharpTreeNode)adaptor.BecomeRoot((SimSharpTreeNode)adaptor.Create(AndThen, "AndThen"), root_1);

                    	    adaptor.AddChild(root_1, stream_equivalence.NextTree());
                    	    adaptor.AddChild(root_1, stream_booleanTertiary.NextTree());

                    	    adaptor.AddChild(root_0, root_1);
                    	    }

                    	}

                    	retval.Tree = root_0;retval.Tree = root_0;}
                    }
                    break;
                case 2 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:615:4: equivalence
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	PushFollow(FOLLOW_equivalence_in_booleanTertiary3664);
                    	equivalence307 = equivalence();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, equivalence307.Tree);

                    }
                    break;

            }
            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "booleanTertiary"

    public class equivalence_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "equivalence"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:618:1: equivalence : implication ( EQV implication )* ;
    public SimSharpParser.equivalence_return equivalence() // throws RecognitionException [1]
    {   
        SimSharpParser.equivalence_return retval = new SimSharpParser.equivalence_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken EQV309 = null;
        SimSharpParser.implication_return implication308 = default(SimSharpParser.implication_return);

        SimSharpParser.implication_return implication310 = default(SimSharpParser.implication_return);


        SimSharpTreeNode EQV309_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:619:2: ( implication ( EQV implication )* )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:619:4: implication ( EQV implication )*
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	PushFollow(FOLLOW_implication_in_equivalence3676);
            	implication308 = implication();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, implication308.Tree);
            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:619:16: ( EQV implication )*
            	do 
            	{
            	    int alt74 = 2;
            	    int LA74_0 = input.LA(1);

            	    if ( (LA74_0 == EQV) )
            	    {
            	        alt74 = 1;
            	    }


            	    switch (alt74) 
            		{
            			case 1 :
            			    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:619:18: EQV implication
            			    {
            			    	EQV309=(IToken)Match(input,EQV,FOLLOW_EQV_in_equivalence3680); if (state.failed) return retval;
            			    	if ( state.backtracking == 0 )
            			    	{EQV309_tree = (SimSharpTreeNode)adaptor.Create(EQV309);
            			    		root_0 = (SimSharpTreeNode)adaptor.BecomeRoot(EQV309_tree, root_0);
            			    	}
            			    	PushFollow(FOLLOW_implication_in_equivalence3683);
            			    	implication310 = implication();
            			    	state.followingStackPointer--;
            			    	if (state.failed) return retval;
            			    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, implication310.Tree);

            			    }
            			    break;

            			default:
            			    goto loop74;
            	    }
            	} while (true);

            	loop74:
            		;	// Stops C# compiler whining that label 'loop74' has no statements


            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "equivalence"

    public class implication_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "implication"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:622:1: implication : booleanTerm ( IMP booleanTerm )* ;
    public SimSharpParser.implication_return implication() // throws RecognitionException [1]
    {   
        SimSharpParser.implication_return retval = new SimSharpParser.implication_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken IMP312 = null;
        SimSharpParser.booleanTerm_return booleanTerm311 = default(SimSharpParser.booleanTerm_return);

        SimSharpParser.booleanTerm_return booleanTerm313 = default(SimSharpParser.booleanTerm_return);


        SimSharpTreeNode IMP312_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:623:2: ( booleanTerm ( IMP booleanTerm )* )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:623:4: booleanTerm ( IMP booleanTerm )*
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	PushFollow(FOLLOW_booleanTerm_in_implication3697);
            	booleanTerm311 = booleanTerm();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, booleanTerm311.Tree);
            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:623:16: ( IMP booleanTerm )*
            	do 
            	{
            	    int alt75 = 2;
            	    int LA75_0 = input.LA(1);

            	    if ( (LA75_0 == IMP) )
            	    {
            	        alt75 = 1;
            	    }


            	    switch (alt75) 
            		{
            			case 1 :
            			    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:623:18: IMP booleanTerm
            			    {
            			    	IMP312=(IToken)Match(input,IMP,FOLLOW_IMP_in_implication3701); if (state.failed) return retval;
            			    	if ( state.backtracking == 0 )
            			    	{IMP312_tree = (SimSharpTreeNode)adaptor.Create(IMP312);
            			    		root_0 = (SimSharpTreeNode)adaptor.BecomeRoot(IMP312_tree, root_0);
            			    	}
            			    	PushFollow(FOLLOW_booleanTerm_in_implication3704);
            			    	booleanTerm313 = booleanTerm();
            			    	state.followingStackPointer--;
            			    	if (state.failed) return retval;
            			    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, booleanTerm313.Tree);

            			    }
            			    break;

            			default:
            			    goto loop75;
            	    }
            	} while (true);

            	loop75:
            		;	// Stops C# compiler whining that label 'loop75' has no statements


            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "implication"

    public class booleanTerm_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "booleanTerm"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:626:1: booleanTerm : booleanFactor ( ( OR ~ ELSE )=> OR booleanFactor )* ;
    public SimSharpParser.booleanTerm_return booleanTerm() // throws RecognitionException [1]
    {   
        SimSharpParser.booleanTerm_return retval = new SimSharpParser.booleanTerm_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken OR315 = null;
        SimSharpParser.booleanFactor_return booleanFactor314 = default(SimSharpParser.booleanFactor_return);

        SimSharpParser.booleanFactor_return booleanFactor316 = default(SimSharpParser.booleanFactor_return);


        SimSharpTreeNode OR315_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:627:2: ( booleanFactor ( ( OR ~ ELSE )=> OR booleanFactor )* )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:627:4: booleanFactor ( ( OR ~ ELSE )=> OR booleanFactor )*
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	PushFollow(FOLLOW_booleanFactor_in_booleanTerm3718);
            	booleanFactor314 = booleanFactor();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, booleanFactor314.Tree);
            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:627:18: ( ( OR ~ ELSE )=> OR booleanFactor )*
            	do 
            	{
            	    int alt76 = 2;
            	    alt76 = dfa76.Predict(input);
            	    switch (alt76) 
            		{
            			case 1 :
            			    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:627:20: ( OR ~ ELSE )=> OR booleanFactor
            			    {
            			    	OR315=(IToken)Match(input,OR,FOLLOW_OR_in_booleanTerm3731); if (state.failed) return retval;
            			    	if ( state.backtracking == 0 )
            			    	{OR315_tree = (SimSharpTreeNode)adaptor.Create(OR315);
            			    		root_0 = (SimSharpTreeNode)adaptor.BecomeRoot(OR315_tree, root_0);
            			    	}
            			    	PushFollow(FOLLOW_booleanFactor_in_booleanTerm3734);
            			    	booleanFactor316 = booleanFactor();
            			    	state.followingStackPointer--;
            			    	if (state.failed) return retval;
            			    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, booleanFactor316.Tree);

            			    }
            			    break;

            			default:
            			    goto loop76;
            	    }
            	} while (true);

            	loop76:
            		;	// Stops C# compiler whining that label 'loop76' has no statements


            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "booleanTerm"

    public class booleanFactor_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "booleanFactor"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:630:1: booleanFactor : booleanSecondary ( ( AND ~ THEN )=> AND booleanSecondary )* ;
    public SimSharpParser.booleanFactor_return booleanFactor() // throws RecognitionException [1]
    {   
        SimSharpParser.booleanFactor_return retval = new SimSharpParser.booleanFactor_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken AND318 = null;
        SimSharpParser.booleanSecondary_return booleanSecondary317 = default(SimSharpParser.booleanSecondary_return);

        SimSharpParser.booleanSecondary_return booleanSecondary319 = default(SimSharpParser.booleanSecondary_return);


        SimSharpTreeNode AND318_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:631:2: ( booleanSecondary ( ( AND ~ THEN )=> AND booleanSecondary )* )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:631:4: booleanSecondary ( ( AND ~ THEN )=> AND booleanSecondary )*
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	PushFollow(FOLLOW_booleanSecondary_in_booleanFactor3749);
            	booleanSecondary317 = booleanSecondary();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, booleanSecondary317.Tree);
            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:631:21: ( ( AND ~ THEN )=> AND booleanSecondary )*
            	do 
            	{
            	    int alt77 = 2;
            	    alt77 = dfa77.Predict(input);
            	    switch (alt77) 
            		{
            			case 1 :
            			    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:631:23: ( AND ~ THEN )=> AND booleanSecondary
            			    {
            			    	AND318=(IToken)Match(input,AND,FOLLOW_AND_in_booleanFactor3763); if (state.failed) return retval;
            			    	if ( state.backtracking == 0 )
            			    	{AND318_tree = (SimSharpTreeNode)adaptor.Create(AND318);
            			    		root_0 = (SimSharpTreeNode)adaptor.BecomeRoot(AND318_tree, root_0);
            			    	}
            			    	PushFollow(FOLLOW_booleanSecondary_in_booleanFactor3766);
            			    	booleanSecondary319 = booleanSecondary();
            			    	state.followingStackPointer--;
            			    	if (state.failed) return retval;
            			    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, booleanSecondary319.Tree);

            			    }
            			    break;

            			default:
            			    goto loop77;
            	    }
            	} while (true);

            	loop77:
            		;	// Stops C# compiler whining that label 'loop77' has no statements


            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "booleanFactor"

    public class booleanSecondary_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "booleanSecondary"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:634:1: booleanSecondary : ( NOT )? referenceExpression ;
    public SimSharpParser.booleanSecondary_return booleanSecondary() // throws RecognitionException [1]
    {   
        SimSharpParser.booleanSecondary_return retval = new SimSharpParser.booleanSecondary_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken NOT320 = null;
        SimSharpParser.referenceExpression_return referenceExpression321 = default(SimSharpParser.referenceExpression_return);


        SimSharpTreeNode NOT320_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:635:2: ( ( NOT )? referenceExpression )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:635:4: ( NOT )? referenceExpression
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:635:4: ( NOT )?
            	int alt78 = 2;
            	alt78 = dfa78.Predict(input);
            	switch (alt78) 
            	{
            	    case 1 :
            	        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:635:5: NOT
            	        {
            	        	NOT320=(IToken)Match(input,NOT,FOLLOW_NOT_in_booleanSecondary3782); if (state.failed) return retval;
            	        	if ( state.backtracking == 0 )
            	        	{NOT320_tree = (SimSharpTreeNode)adaptor.Create(NOT320);
            	        		root_0 = (SimSharpTreeNode)adaptor.BecomeRoot(NOT320_tree, root_0);
            	        	}

            	        }
            	        break;

            	}

            	PushFollow(FOLLOW_referenceExpression_in_booleanSecondary3787);
            	referenceExpression321 = referenceExpression();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, referenceExpression321.Tree);

            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "booleanSecondary"

    public class referenceExpression_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "referenceExpression"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:638:1: referenceExpression : instanceExpression ( referenceComparator instanceExpression )* ;
    public SimSharpParser.referenceExpression_return referenceExpression() // throws RecognitionException [1]
    {   
        SimSharpParser.referenceExpression_return retval = new SimSharpParser.referenceExpression_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        SimSharpParser.instanceExpression_return instanceExpression322 = default(SimSharpParser.instanceExpression_return);

        SimSharpParser.referenceComparator_return referenceComparator323 = default(SimSharpParser.referenceComparator_return);

        SimSharpParser.instanceExpression_return instanceExpression324 = default(SimSharpParser.instanceExpression_return);



        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:639:2: ( instanceExpression ( referenceComparator instanceExpression )* )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:639:4: instanceExpression ( referenceComparator instanceExpression )*
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	PushFollow(FOLLOW_instanceExpression_in_referenceExpression3799);
            	instanceExpression322 = instanceExpression();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, instanceExpression322.Tree);
            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:639:23: ( referenceComparator instanceExpression )*
            	do 
            	{
            	    int alt79 = 2;
            	    int LA79_0 = input.LA(1);

            	    if ( ((LA79_0 >= REFEQ && LA79_0 <= REFNEQ)) )
            	    {
            	        alt79 = 1;
            	    }


            	    switch (alt79) 
            		{
            			case 1 :
            			    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:639:25: referenceComparator instanceExpression
            			    {
            			    	PushFollow(FOLLOW_referenceComparator_in_referenceExpression3803);
            			    	referenceComparator323 = referenceComparator();
            			    	state.followingStackPointer--;
            			    	if (state.failed) return retval;
            			    	if ( state.backtracking == 0 ) root_0 = (SimSharpTreeNode)adaptor.BecomeRoot(referenceComparator323.Tree, root_0);
            			    	PushFollow(FOLLOW_instanceExpression_in_referenceExpression3806);
            			    	instanceExpression324 = instanceExpression();
            			    	state.followingStackPointer--;
            			    	if (state.failed) return retval;
            			    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, instanceExpression324.Tree);

            			    }
            			    break;

            			default:
            			    goto loop79;
            	    }
            	} while (true);

            	loop79:
            		;	// Stops C# compiler whining that label 'loop79' has no statements


            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "referenceExpression"

    public class referenceComparator_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "referenceComparator"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:642:1: referenceComparator : ( REFEQ | REFNEQ );
    public SimSharpParser.referenceComparator_return referenceComparator() // throws RecognitionException [1]
    {   
        SimSharpParser.referenceComparator_return retval = new SimSharpParser.referenceComparator_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken set325 = null;

        SimSharpTreeNode set325_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:643:2: ( REFEQ | REFNEQ )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	set325 = (IToken)input.LT(1);
            	if ( (input.LA(1) >= REFEQ && input.LA(1) <= REFNEQ) ) 
            	{
            	    input.Consume();
            	    if ( state.backtracking == 0 ) adaptor.AddChild(root_0, (SimSharpTreeNode)adaptor.Create(set325));
            	    state.errorRecovery = false;state.failed = false;
            	}
            	else 
            	{
            	    if ( state.backtracking > 0 ) {state.failed = true; return retval;}
            	    MismatchedSetException mse = new MismatchedSetException(null,input);
            	    throw mse;
            	}


            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "referenceComparator"

    public class instanceExpression_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "instanceExpression"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:646:1: instanceExpression : relationExpression ( ( IS | IN ) classIdentifier )? ;
    public SimSharpParser.instanceExpression_return instanceExpression() // throws RecognitionException [1]
    {   
        SimSharpParser.instanceExpression_return retval = new SimSharpParser.instanceExpression_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken set327 = null;
        SimSharpParser.relationExpression_return relationExpression326 = default(SimSharpParser.relationExpression_return);

        SimSharpParser.classIdentifier_return classIdentifier328 = default(SimSharpParser.classIdentifier_return);


        SimSharpTreeNode set327_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:647:2: ( relationExpression ( ( IS | IN ) classIdentifier )? )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:647:4: relationExpression ( ( IS | IN ) classIdentifier )?
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	PushFollow(FOLLOW_relationExpression_in_instanceExpression3837);
            	relationExpression326 = relationExpression();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, relationExpression326.Tree);
            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:647:23: ( ( IS | IN ) classIdentifier )?
            	int alt80 = 2;
            	int LA80_0 = input.LA(1);

            	if ( (LA80_0 == IS || LA80_0 == IN) )
            	{
            	    alt80 = 1;
            	}
            	switch (alt80) 
            	{
            	    case 1 :
            	        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:647:24: ( IS | IN ) classIdentifier
            	        {
            	        	set327=(IToken)input.LT(1);
            	        	set327 = (IToken)input.LT(1);
            	        	if ( input.LA(1) == IS || input.LA(1) == IN ) 
            	        	{
            	        	    input.Consume();
            	        	    if ( state.backtracking == 0 ) root_0 = (SimSharpTreeNode)adaptor.BecomeRoot((SimSharpTreeNode)adaptor.Create(set327), root_0);
            	        	    state.errorRecovery = false;state.failed = false;
            	        	}
            	        	else 
            	        	{
            	        	    if ( state.backtracking > 0 ) {state.failed = true; return retval;}
            	        	    MismatchedSetException mse = new MismatchedSetException(null,input);
            	        	    throw mse;
            	        	}

            	        	PushFollow(FOLLOW_classIdentifier_in_instanceExpression3847);
            	        	classIdentifier328 = classIdentifier();
            	        	state.followingStackPointer--;
            	        	if (state.failed) return retval;
            	        	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, classIdentifier328.Tree);

            	        }
            	        break;

            	}


            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "instanceExpression"

    public class relationExpression_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "relationExpression"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:651:1: relationExpression : additiveExpression ( valueRelationalOperator additiveExpression )* ;
    public SimSharpParser.relationExpression_return relationExpression() // throws RecognitionException [1]
    {   
        SimSharpParser.relationExpression_return retval = new SimSharpParser.relationExpression_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        SimSharpParser.additiveExpression_return additiveExpression329 = default(SimSharpParser.additiveExpression_return);

        SimSharpParser.valueRelationalOperator_return valueRelationalOperator330 = default(SimSharpParser.valueRelationalOperator_return);

        SimSharpParser.additiveExpression_return additiveExpression331 = default(SimSharpParser.additiveExpression_return);



        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:652:2: ( additiveExpression ( valueRelationalOperator additiveExpression )* )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:652:4: additiveExpression ( valueRelationalOperator additiveExpression )*
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	PushFollow(FOLLOW_additiveExpression_in_relationExpression3862);
            	additiveExpression329 = additiveExpression();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, additiveExpression329.Tree);
            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:652:23: ( valueRelationalOperator additiveExpression )*
            	do 
            	{
            	    int alt81 = 2;
            	    int LA81_0 = input.LA(1);

            	    if ( (LA81_0 == EQ || (LA81_0 >= LT && LA81_0 <= NE)) )
            	    {
            	        alt81 = 1;
            	    }


            	    switch (alt81) 
            		{
            			case 1 :
            			    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:652:25: valueRelationalOperator additiveExpression
            			    {
            			    	PushFollow(FOLLOW_valueRelationalOperator_in_relationExpression3866);
            			    	valueRelationalOperator330 = valueRelationalOperator();
            			    	state.followingStackPointer--;
            			    	if (state.failed) return retval;
            			    	if ( state.backtracking == 0 ) root_0 = (SimSharpTreeNode)adaptor.BecomeRoot(valueRelationalOperator330.Tree, root_0);
            			    	PushFollow(FOLLOW_additiveExpression_in_relationExpression3869);
            			    	additiveExpression331 = additiveExpression();
            			    	state.followingStackPointer--;
            			    	if (state.failed) return retval;
            			    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, additiveExpression331.Tree);

            			    }
            			    break;

            			default:
            			    goto loop81;
            	    }
            	} while (true);

            	loop81:
            		;	// Stops C# compiler whining that label 'loop81' has no statements


            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "relationExpression"

    public class valueRelationalOperator_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "valueRelationalOperator"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:655:1: valueRelationalOperator : ( LT | LE | EQ | GE | GT | NE );
    public SimSharpParser.valueRelationalOperator_return valueRelationalOperator() // throws RecognitionException [1]
    {   
        SimSharpParser.valueRelationalOperator_return retval = new SimSharpParser.valueRelationalOperator_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken set332 = null;

        SimSharpTreeNode set332_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:656:2: ( LT | LE | EQ | GE | GT | NE )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	set332 = (IToken)input.LT(1);
            	if ( input.LA(1) == EQ || (input.LA(1) >= LT && input.LA(1) <= NE) ) 
            	{
            	    input.Consume();
            	    if ( state.backtracking == 0 ) adaptor.AddChild(root_0, (SimSharpTreeNode)adaptor.Create(set332));
            	    state.errorRecovery = false;state.failed = false;
            	}
            	else 
            	{
            	    if ( state.backtracking > 0 ) {state.failed = true; return retval;}
            	    MismatchedSetException mse = new MismatchedSetException(null,input);
            	    throw mse;
            	}


            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "valueRelationalOperator"

    public class additiveExpression_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "additiveExpression"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:660:1: additiveExpression : term ( ( PLUS | MINUS ) term )* ;
    public SimSharpParser.additiveExpression_return additiveExpression() // throws RecognitionException [1]
    {   
        SimSharpParser.additiveExpression_return retval = new SimSharpParser.additiveExpression_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken set334 = null;
        SimSharpParser.term_return term333 = default(SimSharpParser.term_return);

        SimSharpParser.term_return term335 = default(SimSharpParser.term_return);


        SimSharpTreeNode set334_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:661:2: ( term ( ( PLUS | MINUS ) term )* )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:661:4: term ( ( PLUS | MINUS ) term )*
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	PushFollow(FOLLOW_term_in_additiveExpression3915);
            	term333 = term();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, term333.Tree);
            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:661:9: ( ( PLUS | MINUS ) term )*
            	do 
            	{
            	    int alt82 = 2;
            	    int LA82_0 = input.LA(1);

            	    if ( ((LA82_0 >= PLUS && LA82_0 <= MINUS)) )
            	    {
            	        alt82 = 1;
            	    }


            	    switch (alt82) 
            		{
            			case 1 :
            			    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:661:11: ( PLUS | MINUS ) term
            			    {
            			    	set334=(IToken)input.LT(1);
            			    	set334 = (IToken)input.LT(1);
            			    	if ( (input.LA(1) >= PLUS && input.LA(1) <= MINUS) ) 
            			    	{
            			    	    input.Consume();
            			    	    if ( state.backtracking == 0 ) root_0 = (SimSharpTreeNode)adaptor.BecomeRoot((SimSharpTreeNode)adaptor.Create(set334), root_0);
            			    	    state.errorRecovery = false;state.failed = false;
            			    	}
            			    	else 
            			    	{
            			    	    if ( state.backtracking > 0 ) {state.failed = true; return retval;}
            			    	    MismatchedSetException mse = new MismatchedSetException(null,input);
            			    	    throw mse;
            			    	}

            			    	PushFollow(FOLLOW_term_in_additiveExpression3926);
            			    	term335 = term();
            			    	state.followingStackPointer--;
            			    	if (state.failed) return retval;
            			    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, term335.Tree);

            			    }
            			    break;

            			default:
            			    goto loop82;
            	    }
            	} while (true);

            	loop82:
            		;	// Stops C# compiler whining that label 'loop82' has no statements


            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "additiveExpression"

    public class term_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "term"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:664:1: term : factor ( ( TIMES | DIV | INTDIV ) factor )* ;
    public SimSharpParser.term_return term() // throws RecognitionException [1]
    {   
        SimSharpParser.term_return retval = new SimSharpParser.term_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken set337 = null;
        SimSharpParser.factor_return factor336 = default(SimSharpParser.factor_return);

        SimSharpParser.factor_return factor338 = default(SimSharpParser.factor_return);


        SimSharpTreeNode set337_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:664:6: ( factor ( ( TIMES | DIV | INTDIV ) factor )* )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:664:8: factor ( ( TIMES | DIV | INTDIV ) factor )*
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	PushFollow(FOLLOW_factor_in_term3939);
            	factor336 = factor();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, factor336.Tree);
            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:664:15: ( ( TIMES | DIV | INTDIV ) factor )*
            	do 
            	{
            	    int alt83 = 2;
            	    int LA83_0 = input.LA(1);

            	    if ( ((LA83_0 >= TIMES && LA83_0 <= INTDIV)) )
            	    {
            	        alt83 = 1;
            	    }


            	    switch (alt83) 
            		{
            			case 1 :
            			    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:664:17: ( TIMES | DIV | INTDIV ) factor
            			    {
            			    	set337=(IToken)input.LT(1);
            			    	set337 = (IToken)input.LT(1);
            			    	if ( (input.LA(1) >= TIMES && input.LA(1) <= INTDIV) ) 
            			    	{
            			    	    input.Consume();
            			    	    if ( state.backtracking == 0 ) root_0 = (SimSharpTreeNode)adaptor.BecomeRoot((SimSharpTreeNode)adaptor.Create(set337), root_0);
            			    	    state.errorRecovery = false;state.failed = false;
            			    	}
            			    	else 
            			    	{
            			    	    if ( state.backtracking > 0 ) {state.failed = true; return retval;}
            			    	    MismatchedSetException mse = new MismatchedSetException(null,input);
            			    	    throw mse;
            			    	}

            			    	PushFollow(FOLLOW_factor_in_term3958);
            			    	factor338 = factor();
            			    	state.followingStackPointer--;
            			    	if (state.failed) return retval;
            			    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, factor338.Tree);

            			    }
            			    break;

            			default:
            			    goto loop83;
            	    }
            	} while (true);

            	loop83:
            		;	// Stops C# compiler whining that label 'loop83' has no statements


            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "term"

    public class factor_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "factor"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:666:1: factor : unaryExpression ( EXP unaryExpression )* ;
    public SimSharpParser.factor_return factor() // throws RecognitionException [1]
    {   
        SimSharpParser.factor_return retval = new SimSharpParser.factor_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken EXP340 = null;
        SimSharpParser.unaryExpression_return unaryExpression339 = default(SimSharpParser.unaryExpression_return);

        SimSharpParser.unaryExpression_return unaryExpression341 = default(SimSharpParser.unaryExpression_return);


        SimSharpTreeNode EXP340_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:666:8: ( unaryExpression ( EXP unaryExpression )* )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:666:10: unaryExpression ( EXP unaryExpression )*
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	PushFollow(FOLLOW_unaryExpression_in_factor3970);
            	unaryExpression339 = unaryExpression();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, unaryExpression339.Tree);
            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:666:26: ( EXP unaryExpression )*
            	do 
            	{
            	    int alt84 = 2;
            	    int LA84_0 = input.LA(1);

            	    if ( (LA84_0 == EXP) )
            	    {
            	        alt84 = 1;
            	    }


            	    switch (alt84) 
            		{
            			case 1 :
            			    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:666:28: EXP unaryExpression
            			    {
            			    	EXP340=(IToken)Match(input,EXP,FOLLOW_EXP_in_factor3974); if (state.failed) return retval;
            			    	if ( state.backtracking == 0 )
            			    	{EXP340_tree = (SimSharpTreeNode)adaptor.Create(EXP340);
            			    		root_0 = (SimSharpTreeNode)adaptor.BecomeRoot(EXP340_tree, root_0);
            			    	}
            			    	PushFollow(FOLLOW_unaryExpression_in_factor3977);
            			    	unaryExpression341 = unaryExpression();
            			    	state.followingStackPointer--;
            			    	if (state.failed) return retval;
            			    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, unaryExpression341.Tree);

            			    }
            			    break;

            			default:
            			    goto loop84;
            	    }
            	} while (true);

            	loop84:
            		;	// Stops C# compiler whining that label 'loop84' has no statements


            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "factor"

    public class unaryExpression_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "unaryExpression"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:668:1: unaryExpression : ( PLUS unaryExpression -> ^( Unary PLUS unaryExpression ) | MINUS unaryExpression -> ^( Unary MINUS unaryExpression ) | postfixExpression );
    public SimSharpParser.unaryExpression_return unaryExpression() // throws RecognitionException [1]
    {   
        SimSharpParser.unaryExpression_return retval = new SimSharpParser.unaryExpression_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken PLUS342 = null;
        IToken MINUS344 = null;
        SimSharpParser.unaryExpression_return unaryExpression343 = default(SimSharpParser.unaryExpression_return);

        SimSharpParser.unaryExpression_return unaryExpression345 = default(SimSharpParser.unaryExpression_return);

        SimSharpParser.postfixExpression_return postfixExpression346 = default(SimSharpParser.postfixExpression_return);


        SimSharpTreeNode PLUS342_tree=null;
        SimSharpTreeNode MINUS344_tree=null;
        RewriteRuleTokenStream stream_PLUS = new RewriteRuleTokenStream(adaptor,"token PLUS");
        RewriteRuleTokenStream stream_MINUS = new RewriteRuleTokenStream(adaptor,"token MINUS");
        RewriteRuleSubtreeStream stream_unaryExpression = new RewriteRuleSubtreeStream(adaptor,"rule unaryExpression");
        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:669:2: ( PLUS unaryExpression -> ^( Unary PLUS unaryExpression ) | MINUS unaryExpression -> ^( Unary MINUS unaryExpression ) | postfixExpression )
            int alt85 = 3;
            alt85 = dfa85.Predict(input);
            switch (alt85) 
            {
                case 1 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:669:4: PLUS unaryExpression
                    {
                    	PLUS342=(IToken)Match(input,PLUS,FOLLOW_PLUS_in_unaryExpression3991); if (state.failed) return retval; 
                    	if ( (state.backtracking==0) ) stream_PLUS.Add(PLUS342);

                    	PushFollow(FOLLOW_unaryExpression_in_unaryExpression3993);
                    	unaryExpression343 = unaryExpression();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( (state.backtracking==0) ) stream_unaryExpression.Add(unaryExpression343.Tree);


                    	// AST REWRITE
                    	// elements:          unaryExpression, PLUS
                    	// token labels:      
                    	// rule labels:       retval
                    	// token list labels: 
                    	// rule list labels:  
                    	// wildcard labels: 
                    	if ( (state.backtracking==0) ) {
                    	retval.Tree = root_0;
                    	RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval!=null ? retval.Tree : null);

                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();
                    	// 669:26: -> ^( Unary PLUS unaryExpression )
                    	{
                    	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:669:29: ^( Unary PLUS unaryExpression )
                    	    {
                    	    SimSharpTreeNode root_1 = (SimSharpTreeNode)adaptor.GetNilNode();
                    	    root_1 = (SimSharpTreeNode)adaptor.BecomeRoot((SimSharpTreeNode)adaptor.Create(Unary, "Unary"), root_1);

                    	    adaptor.AddChild(root_1, stream_PLUS.NextNode());
                    	    adaptor.AddChild(root_1, stream_unaryExpression.NextTree());

                    	    adaptor.AddChild(root_0, root_1);
                    	    }

                    	}

                    	retval.Tree = root_0;retval.Tree = root_0;}
                    }
                    break;
                case 2 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:670:4: MINUS unaryExpression
                    {
                    	MINUS344=(IToken)Match(input,MINUS,FOLLOW_MINUS_in_unaryExpression4009); if (state.failed) return retval; 
                    	if ( (state.backtracking==0) ) stream_MINUS.Add(MINUS344);

                    	PushFollow(FOLLOW_unaryExpression_in_unaryExpression4011);
                    	unaryExpression345 = unaryExpression();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( (state.backtracking==0) ) stream_unaryExpression.Add(unaryExpression345.Tree);


                    	// AST REWRITE
                    	// elements:          unaryExpression, MINUS
                    	// token labels:      
                    	// rule labels:       retval
                    	// token list labels: 
                    	// rule list labels:  
                    	// wildcard labels: 
                    	if ( (state.backtracking==0) ) {
                    	retval.Tree = root_0;
                    	RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval!=null ? retval.Tree : null);

                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();
                    	// 670:26: -> ^( Unary MINUS unaryExpression )
                    	{
                    	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:670:29: ^( Unary MINUS unaryExpression )
                    	    {
                    	    SimSharpTreeNode root_1 = (SimSharpTreeNode)adaptor.GetNilNode();
                    	    root_1 = (SimSharpTreeNode)adaptor.BecomeRoot((SimSharpTreeNode)adaptor.Create(Unary, "Unary"), root_1);

                    	    adaptor.AddChild(root_1, stream_MINUS.NextNode());
                    	    adaptor.AddChild(root_1, stream_unaryExpression.NextTree());

                    	    adaptor.AddChild(root_0, root_1);
                    	    }

                    	}

                    	retval.Tree = root_0;retval.Tree = root_0;}
                    }
                    break;
                case 3 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:671:4: postfixExpression
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	PushFollow(FOLLOW_postfixExpression_in_unaryExpression4026);
                    	postfixExpression346 = postfixExpression();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, postfixExpression346.Tree);

                    }
                    break;

            }
            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "unaryExpression"

    public class postfixExpression_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "postfixExpression"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:674:1: postfixExpression : ({...}? => ( qualifierExpression -> qualifierExpression ) ( ( ( DOT e= qualifierExpression -> ^( RemoteAssign $postfixExpression $e) )* ) ) | {...}? => ( qualifierExpression -> qualifierExpression ) ( ( ( DOT e= qualifierExpression -> ^( RemoteAccess $postfixExpression $e) )* ) ) );
    public SimSharpParser.postfixExpression_return postfixExpression() // throws RecognitionException [1]
    {   
        SimSharpParser.postfixExpression_return retval = new SimSharpParser.postfixExpression_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken DOT348 = null;
        IToken DOT350 = null;
        SimSharpParser.qualifierExpression_return e = default(SimSharpParser.qualifierExpression_return);

        SimSharpParser.qualifierExpression_return qualifierExpression347 = default(SimSharpParser.qualifierExpression_return);

        SimSharpParser.qualifierExpression_return qualifierExpression349 = default(SimSharpParser.qualifierExpression_return);


        SimSharpTreeNode DOT348_tree=null;
        SimSharpTreeNode DOT350_tree=null;
        RewriteRuleTokenStream stream_DOT = new RewriteRuleTokenStream(adaptor,"token DOT");
        RewriteRuleSubtreeStream stream_qualifierExpression = new RewriteRuleSubtreeStream(adaptor,"rule qualifierExpression");
        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:675:2: ({...}? => ( qualifierExpression -> qualifierExpression ) ( ( ( DOT e= qualifierExpression -> ^( RemoteAssign $postfixExpression $e) )* ) ) | {...}? => ( qualifierExpression -> qualifierExpression ) ( ( ( DOT e= qualifierExpression -> ^( RemoteAccess $postfixExpression $e) )* ) ) )
            int alt88 = 2;
            alt88 = dfa88.Predict(input);
            switch (alt88) 
            {
                case 1 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:675:4: {...}? => ( qualifierExpression -> qualifierExpression ) ( ( ( DOT e= qualifierExpression -> ^( RemoteAssign $postfixExpression $e) )* ) )
                    {
                    	if ( !((assignment==true)) ) 
                    	{
                    	    if ( state.backtracking > 0 ) {state.failed = true; return retval;}
                    	    throw new FailedPredicateException(input, "postfixExpression", "assignment==true");
                    	}
                    	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:675:25: ( qualifierExpression -> qualifierExpression )
                    	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:675:26: qualifierExpression
                    	{
                    		PushFollow(FOLLOW_qualifierExpression_in_postfixExpression4040);
                    		qualifierExpression347 = qualifierExpression();
                    		state.followingStackPointer--;
                    		if (state.failed) return retval;
                    		if ( (state.backtracking==0) ) stream_qualifierExpression.Add(qualifierExpression347.Tree);


                    		// AST REWRITE
                    		// elements:          qualifierExpression
                    		// token labels:      
                    		// rule labels:       retval
                    		// token list labels: 
                    		// rule list labels:  
                    		// wildcard labels: 
                    		if ( (state.backtracking==0) ) {
                    		retval.Tree = root_0;
                    		RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval!=null ? retval.Tree : null);

                    		root_0 = (SimSharpTreeNode)adaptor.GetNilNode();
                    		// 675:45: -> qualifierExpression
                    		{
                    		    adaptor.AddChild(root_0, stream_qualifierExpression.NextTree());

                    		}

                    		retval.Tree = root_0;retval.Tree = root_0;}
                    	}

                    	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:676:4: ( ( ( DOT e= qualifierExpression -> ^( RemoteAssign $postfixExpression $e) )* ) )
                    	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:677:5: ( ( DOT e= qualifierExpression -> ^( RemoteAssign $postfixExpression $e) )* )
                    	{
                    		// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:677:5: ( ( DOT e= qualifierExpression -> ^( RemoteAssign $postfixExpression $e) )* )
                    		// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:677:6: ( DOT e= qualifierExpression -> ^( RemoteAssign $postfixExpression $e) )*
                    		{
                    			// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:677:6: ( DOT e= qualifierExpression -> ^( RemoteAssign $postfixExpression $e) )*
                    			do 
                    			{
                    			    int alt86 = 2;
                    			    int LA86_0 = input.LA(1);

                    			    if ( (LA86_0 == DOT) )
                    			    {
                    			        alt86 = 1;
                    			    }


                    			    switch (alt86) 
                    				{
                    					case 1 :
                    					    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:678:5: DOT e= qualifierExpression
                    					    {
                    					    	DOT348=(IToken)Match(input,DOT,FOLLOW_DOT_in_postfixExpression4062); if (state.failed) return retval; 
                    					    	if ( (state.backtracking==0) ) stream_DOT.Add(DOT348);

                    					    	PushFollow(FOLLOW_qualifierExpression_in_postfixExpression4066);
                    					    	e = qualifierExpression();
                    					    	state.followingStackPointer--;
                    					    	if (state.failed) return retval;
                    					    	if ( (state.backtracking==0) ) stream_qualifierExpression.Add(e.Tree);


                    					    	// AST REWRITE
                    					    	// elements:          postfixExpression, e
                    					    	// token labels:      
                    					    	// rule labels:       retval, e
                    					    	// token list labels: 
                    					    	// rule list labels:  
                    					    	// wildcard labels: 
                    					    	if ( (state.backtracking==0) ) {
                    					    	retval.Tree = root_0;
                    					    	RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval!=null ? retval.Tree : null);
                    					    	RewriteRuleSubtreeStream stream_e = new RewriteRuleSubtreeStream(adaptor, "rule e", e!=null ? e.Tree : null);

                    					    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();
                    					    	// 678:31: -> ^( RemoteAssign $postfixExpression $e)
                    					    	{
                    					    	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:678:34: ^( RemoteAssign $postfixExpression $e)
                    					    	    {
                    					    	    SimSharpTreeNode root_1 = (SimSharpTreeNode)adaptor.GetNilNode();
                    					    	    root_1 = (SimSharpTreeNode)adaptor.BecomeRoot((SimSharpTreeNode)adaptor.Create(RemoteAssign, "RemoteAssign"), root_1);

                    					    	    adaptor.AddChild(root_1, stream_retval.NextTree());
                    					    	    adaptor.AddChild(root_1, stream_e.NextTree());

                    					    	    adaptor.AddChild(root_0, root_1);
                    					    	    }

                    					    	}

                    					    	retval.Tree = root_0;retval.Tree = root_0;}
                    					    }
                    					    break;

                    					default:
                    					    goto loop86;
                    			    }
                    			} while (true);

                    			loop86:
                    				;	// Stops C# compiler whining that label 'loop86' has no statements


                    		}


                    	}


                    }
                    break;
                case 2 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:681:4: {...}? => ( qualifierExpression -> qualifierExpression ) ( ( ( DOT e= qualifierExpression -> ^( RemoteAccess $postfixExpression $e) )* ) )
                    {
                    	if ( !((assignment==false)) ) 
                    	{
                    	    if ( state.backtracking > 0 ) {state.failed = true; return retval;}
                    	    throw new FailedPredicateException(input, "postfixExpression", "assignment==false");
                    	}
                    	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:681:26: ( qualifierExpression -> qualifierExpression )
                    	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:681:27: qualifierExpression
                    	{
                    		PushFollow(FOLLOW_qualifierExpression_in_postfixExpression4102);
                    		qualifierExpression349 = qualifierExpression();
                    		state.followingStackPointer--;
                    		if (state.failed) return retval;
                    		if ( (state.backtracking==0) ) stream_qualifierExpression.Add(qualifierExpression349.Tree);


                    		// AST REWRITE
                    		// elements:          qualifierExpression
                    		// token labels:      
                    		// rule labels:       retval
                    		// token list labels: 
                    		// rule list labels:  
                    		// wildcard labels: 
                    		if ( (state.backtracking==0) ) {
                    		retval.Tree = root_0;
                    		RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval!=null ? retval.Tree : null);

                    		root_0 = (SimSharpTreeNode)adaptor.GetNilNode();
                    		// 681:46: -> qualifierExpression
                    		{
                    		    adaptor.AddChild(root_0, stream_qualifierExpression.NextTree());

                    		}

                    		retval.Tree = root_0;retval.Tree = root_0;}
                    	}

                    	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:682:4: ( ( ( DOT e= qualifierExpression -> ^( RemoteAccess $postfixExpression $e) )* ) )
                    	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:683:5: ( ( DOT e= qualifierExpression -> ^( RemoteAccess $postfixExpression $e) )* )
                    	{
                    		// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:683:5: ( ( DOT e= qualifierExpression -> ^( RemoteAccess $postfixExpression $e) )* )
                    		// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:683:6: ( DOT e= qualifierExpression -> ^( RemoteAccess $postfixExpression $e) )*
                    		{
                    			// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:683:6: ( DOT e= qualifierExpression -> ^( RemoteAccess $postfixExpression $e) )*
                    			do 
                    			{
                    			    int alt87 = 2;
                    			    int LA87_0 = input.LA(1);

                    			    if ( (LA87_0 == DOT) )
                    			    {
                    			        alt87 = 1;
                    			    }


                    			    switch (alt87) 
                    				{
                    					case 1 :
                    					    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:684:5: DOT e= qualifierExpression
                    					    {
                    					    	DOT350=(IToken)Match(input,DOT,FOLLOW_DOT_in_postfixExpression4124); if (state.failed) return retval; 
                    					    	if ( (state.backtracking==0) ) stream_DOT.Add(DOT350);

                    					    	PushFollow(FOLLOW_qualifierExpression_in_postfixExpression4128);
                    					    	e = qualifierExpression();
                    					    	state.followingStackPointer--;
                    					    	if (state.failed) return retval;
                    					    	if ( (state.backtracking==0) ) stream_qualifierExpression.Add(e.Tree);


                    					    	// AST REWRITE
                    					    	// elements:          postfixExpression, e
                    					    	// token labels:      
                    					    	// rule labels:       retval, e
                    					    	// token list labels: 
                    					    	// rule list labels:  
                    					    	// wildcard labels: 
                    					    	if ( (state.backtracking==0) ) {
                    					    	retval.Tree = root_0;
                    					    	RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval!=null ? retval.Tree : null);
                    					    	RewriteRuleSubtreeStream stream_e = new RewriteRuleSubtreeStream(adaptor, "rule e", e!=null ? e.Tree : null);

                    					    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();
                    					    	// 684:31: -> ^( RemoteAccess $postfixExpression $e)
                    					    	{
                    					    	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:684:34: ^( RemoteAccess $postfixExpression $e)
                    					    	    {
                    					    	    SimSharpTreeNode root_1 = (SimSharpTreeNode)adaptor.GetNilNode();
                    					    	    root_1 = (SimSharpTreeNode)adaptor.BecomeRoot((SimSharpTreeNode)adaptor.Create(RemoteAccess, "RemoteAccess"), root_1);

                    					    	    adaptor.AddChild(root_1, stream_retval.NextTree());
                    					    	    adaptor.AddChild(root_1, stream_e.NextTree());

                    					    	    adaptor.AddChild(root_0, root_1);
                    					    	    }

                    					    	}

                    					    	retval.Tree = root_0;retval.Tree = root_0;}
                    					    }
                    					    break;

                    					default:
                    					    goto loop87;
                    			    }
                    			} while (true);

                    			loop87:
                    				;	// Stops C# compiler whining that label 'loop87' has no statements


                    		}


                    	}


                    }
                    break;

            }
            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "postfixExpression"

    public class qualifierExpression_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "qualifierExpression"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:692:1: qualifierExpression : textConcat ( QUA classIdentifier )* ;
    public SimSharpParser.qualifierExpression_return qualifierExpression() // throws RecognitionException [1]
    {   
        SimSharpParser.qualifierExpression_return retval = new SimSharpParser.qualifierExpression_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken QUA352 = null;
        SimSharpParser.textConcat_return textConcat351 = default(SimSharpParser.textConcat_return);

        SimSharpParser.classIdentifier_return classIdentifier353 = default(SimSharpParser.classIdentifier_return);


        SimSharpTreeNode QUA352_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:693:2: ( textConcat ( QUA classIdentifier )* )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:693:4: textConcat ( QUA classIdentifier )*
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	PushFollow(FOLLOW_textConcat_in_qualifierExpression4176);
            	textConcat351 = textConcat();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, textConcat351.Tree);
            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:693:15: ( QUA classIdentifier )*
            	do 
            	{
            	    int alt89 = 2;
            	    int LA89_0 = input.LA(1);

            	    if ( (LA89_0 == QUA) )
            	    {
            	        alt89 = 1;
            	    }


            	    switch (alt89) 
            		{
            			case 1 :
            			    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:693:16: QUA classIdentifier
            			    {
            			    	QUA352=(IToken)Match(input,QUA,FOLLOW_QUA_in_qualifierExpression4179); if (state.failed) return retval;
            			    	if ( state.backtracking == 0 )
            			    	{QUA352_tree = (SimSharpTreeNode)adaptor.Create(QUA352);
            			    		root_0 = (SimSharpTreeNode)adaptor.BecomeRoot(QUA352_tree, root_0);
            			    	}
            			    	PushFollow(FOLLOW_classIdentifier_in_qualifierExpression4182);
            			    	classIdentifier353 = classIdentifier();
            			    	state.followingStackPointer--;
            			    	if (state.failed) return retval;
            			    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, classIdentifier353.Tree);

            			    }
            			    break;

            			default:
            			    goto loop89;
            	    }
            	} while (true);

            	loop89:
            		;	// Stops C# compiler whining that label 'loop89' has no statements


            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "qualifierExpression"

    public class textConcat_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "textConcat"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:696:1: textConcat : primary ( CONCAT primary )* ;
    public SimSharpParser.textConcat_return textConcat() // throws RecognitionException [1]
    {   
        SimSharpParser.textConcat_return retval = new SimSharpParser.textConcat_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken CONCAT355 = null;
        SimSharpParser.primary_return primary354 = default(SimSharpParser.primary_return);

        SimSharpParser.primary_return primary356 = default(SimSharpParser.primary_return);


        SimSharpTreeNode CONCAT355_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:697:2: ( primary ( CONCAT primary )* )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:697:4: primary ( CONCAT primary )*
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	PushFollow(FOLLOW_primary_in_textConcat4195);
            	primary354 = primary();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, primary354.Tree);
            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:697:12: ( CONCAT primary )*
            	do 
            	{
            	    int alt90 = 2;
            	    int LA90_0 = input.LA(1);

            	    if ( (LA90_0 == CONCAT) )
            	    {
            	        alt90 = 1;
            	    }


            	    switch (alt90) 
            		{
            			case 1 :
            			    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:697:14: CONCAT primary
            			    {
            			    	CONCAT355=(IToken)Match(input,CONCAT,FOLLOW_CONCAT_in_textConcat4199); if (state.failed) return retval;
            			    	if ( state.backtracking == 0 )
            			    	{CONCAT355_tree = (SimSharpTreeNode)adaptor.Create(CONCAT355);
            			    		root_0 = (SimSharpTreeNode)adaptor.BecomeRoot(CONCAT355_tree, root_0);
            			    	}
            			    	PushFollow(FOLLOW_primary_in_textConcat4202);
            			    	primary356 = primary();
            			    	state.followingStackPointer--;
            			    	if (state.failed) return retval;
            			    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, primary356.Tree);

            			    }
            			    break;

            			default:
            			    goto loop90;
            	    }
            	} while (true);

            	loop90:
            		;	// Stops C# compiler whining that label 'loop90' has no statements


            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "textConcat"

    public class primary_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "primary"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:700:1: primary : ( NONE | litteral | objectGenerator | localObject | logicalValue | primaryIdentifier ( actualParameterPart )? | LPAR expression RPAR -> expression );
    public SimSharpParser.primary_return primary() // throws RecognitionException [1]
    {   
        SimSharpParser.primary_return retval = new SimSharpParser.primary_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken NONE357 = null;
        IToken LPAR364 = null;
        IToken RPAR366 = null;
        SimSharpParser.litteral_return litteral358 = default(SimSharpParser.litteral_return);

        SimSharpParser.objectGenerator_return objectGenerator359 = default(SimSharpParser.objectGenerator_return);

        SimSharpParser.localObject_return localObject360 = default(SimSharpParser.localObject_return);

        SimSharpParser.logicalValue_return logicalValue361 = default(SimSharpParser.logicalValue_return);

        SimSharpParser.primaryIdentifier_return primaryIdentifier362 = default(SimSharpParser.primaryIdentifier_return);

        SimSharpParser.actualParameterPart_return actualParameterPart363 = default(SimSharpParser.actualParameterPart_return);

        SimSharpParser.expression_return expression365 = default(SimSharpParser.expression_return);


        SimSharpTreeNode NONE357_tree=null;
        SimSharpTreeNode LPAR364_tree=null;
        SimSharpTreeNode RPAR366_tree=null;
        RewriteRuleTokenStream stream_RPAR = new RewriteRuleTokenStream(adaptor,"token RPAR");
        RewriteRuleTokenStream stream_LPAR = new RewriteRuleTokenStream(adaptor,"token LPAR");
        RewriteRuleSubtreeStream stream_expression = new RewriteRuleSubtreeStream(adaptor,"rule expression");
        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:700:9: ( NONE | litteral | objectGenerator | localObject | logicalValue | primaryIdentifier ( actualParameterPart )? | LPAR expression RPAR -> expression )
            int alt92 = 7;
            switch ( input.LA(1) ) 
            {
            case NONE:
            	{
                alt92 = 1;
                }
                break;
            case STRING:
            case NUM_INT:
            case NUM_REAL:
            case NOTEXT:
            case CHARCONST:
            	{
                alt92 = 2;
                }
                break;
            case NEW:
            	{
                alt92 = 3;
                }
                break;
            case THIS:
            	{
                alt92 = 4;
                }
                break;
            case TRUE:
            case FALSE:
            	{
                alt92 = 5;
                }
                break;
            case ID:
            	{
                alt92 = 6;
                }
                break;
            case LPAR:
            	{
                alt92 = 7;
                }
                break;
            	default:
            	    if ( state.backtracking > 0 ) {state.failed = true; return retval;}
            	    NoViableAltException nvae_d92s0 =
            	        new NoViableAltException("", 92, 0, input);

            	    throw nvae_d92s0;
            }

            switch (alt92) 
            {
                case 1 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:700:11: NONE
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	NONE357=(IToken)Match(input,NONE,FOLLOW_NONE_in_primary4215); if (state.failed) return retval;
                    	if ( state.backtracking == 0 )
                    	{NONE357_tree = (SimSharpTreeNode)adaptor.Create(NONE357);
                    		adaptor.AddChild(root_0, NONE357_tree);
                    	}

                    }
                    break;
                case 2 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:701:4: litteral
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	PushFollow(FOLLOW_litteral_in_primary4220);
                    	litteral358 = litteral();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, litteral358.Tree);

                    }
                    break;
                case 3 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:702:4: objectGenerator
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	PushFollow(FOLLOW_objectGenerator_in_primary4225);
                    	objectGenerator359 = objectGenerator();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, objectGenerator359.Tree);

                    }
                    break;
                case 4 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:703:4: localObject
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	PushFollow(FOLLOW_localObject_in_primary4230);
                    	localObject360 = localObject();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, localObject360.Tree);

                    }
                    break;
                case 5 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:704:4: logicalValue
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	PushFollow(FOLLOW_logicalValue_in_primary4236);
                    	logicalValue361 = logicalValue();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, logicalValue361.Tree);

                    }
                    break;
                case 6 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:705:4: primaryIdentifier ( actualParameterPart )?
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	PushFollow(FOLLOW_primaryIdentifier_in_primary4241);
                    	primaryIdentifier362 = primaryIdentifier();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, primaryIdentifier362.Tree);
                    	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:705:22: ( actualParameterPart )?
                    	int alt91 = 2;
                    	int LA91_0 = input.LA(1);

                    	if ( (LA91_0 == LPAR) )
                    	{
                    	    alt91 = 1;
                    	}
                    	switch (alt91) 
                    	{
                    	    case 1 :
                    	        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:705:23: actualParameterPart
                    	        {
                    	        	PushFollow(FOLLOW_actualParameterPart_in_primary4244);
                    	        	actualParameterPart363 = actualParameterPart();
                    	        	state.followingStackPointer--;
                    	        	if (state.failed) return retval;
                    	        	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, actualParameterPart363.Tree);

                    	        }
                    	        break;

                    	}


                    }
                    break;
                case 7 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:706:4: LPAR expression RPAR
                    {
                    	LPAR364=(IToken)Match(input,LPAR,FOLLOW_LPAR_in_primary4252); if (state.failed) return retval; 
                    	if ( (state.backtracking==0) ) stream_LPAR.Add(LPAR364);

                    	PushFollow(FOLLOW_expression_in_primary4254);
                    	expression365 = expression();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( (state.backtracking==0) ) stream_expression.Add(expression365.Tree);
                    	RPAR366=(IToken)Match(input,RPAR,FOLLOW_RPAR_in_primary4256); if (state.failed) return retval; 
                    	if ( (state.backtracking==0) ) stream_RPAR.Add(RPAR366);



                    	// AST REWRITE
                    	// elements:          expression
                    	// token labels:      
                    	// rule labels:       retval
                    	// token list labels: 
                    	// rule list labels:  
                    	// wildcard labels: 
                    	if ( (state.backtracking==0) ) {
                    	retval.Tree = root_0;
                    	RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval!=null ? retval.Tree : null);

                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();
                    	// 706:25: -> expression
                    	{
                    	    adaptor.AddChild(root_0, stream_expression.NextTree());

                    	}

                    	retval.Tree = root_0;retval.Tree = root_0;}
                    }
                    break;

            }
            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "primary"

    public class litteral_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "litteral"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:709:1: litteral : ( NUM_INT | NUM_REAL | NOTEXT | STRING | CHARCONST );
    public SimSharpParser.litteral_return litteral() // throws RecognitionException [1]
    {   
        SimSharpParser.litteral_return retval = new SimSharpParser.litteral_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken set367 = null;

        SimSharpTreeNode set367_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:709:9: ( NUM_INT | NUM_REAL | NOTEXT | STRING | CHARCONST )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	set367 = (IToken)input.LT(1);
            	if ( input.LA(1) == STRING || (input.LA(1) >= NUM_INT && input.LA(1) <= CHARCONST) ) 
            	{
            	    input.Consume();
            	    if ( state.backtracking == 0 ) adaptor.AddChild(root_0, (SimSharpTreeNode)adaptor.Create(set367));
            	    state.errorRecovery = false;state.failed = false;
            	}
            	else 
            	{
            	    if ( state.backtracking > 0 ) {state.failed = true; return retval;}
            	    MismatchedSetException mse = new MismatchedSetException(null,input);
            	    throw mse;
            	}


            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "litteral"

    public class primaryIdentifier_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "primaryIdentifier"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:716:1: primaryIdentifier : ID ;
    public SimSharpParser.primaryIdentifier_return primaryIdentifier() // throws RecognitionException [1]
    {   
        SimSharpParser.primaryIdentifier_return retval = new SimSharpParser.primaryIdentifier_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken ID368 = null;

        SimSharpTreeNode ID368_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:717:2: ( ID )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:717:4: ID
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	ID368=(IToken)Match(input,ID,FOLLOW_ID_in_primaryIdentifier4302); if (state.failed) return retval;
            	if ( state.backtracking == 0 )
            	{ID368_tree = (SimSharpTreeNode)adaptor.Create(ID368);
            		adaptor.AddChild(root_0, ID368_tree);
            	}

            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "primaryIdentifier"

    public class switchDesignator_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "switchDesignator"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:720:1: switchDesignator : switchIdentifier LPAR subscriptExpression RPAR ;
    public SimSharpParser.switchDesignator_return switchDesignator() // throws RecognitionException [1]
    {   
        SimSharpParser.switchDesignator_return retval = new SimSharpParser.switchDesignator_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken LPAR370 = null;
        IToken RPAR372 = null;
        SimSharpParser.switchIdentifier_return switchIdentifier369 = default(SimSharpParser.switchIdentifier_return);

        SimSharpParser.subscriptExpression_return subscriptExpression371 = default(SimSharpParser.subscriptExpression_return);


        SimSharpTreeNode LPAR370_tree=null;
        SimSharpTreeNode RPAR372_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:721:2: ( switchIdentifier LPAR subscriptExpression RPAR )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:721:4: switchIdentifier LPAR subscriptExpression RPAR
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	PushFollow(FOLLOW_switchIdentifier_in_switchDesignator4313);
            	switchIdentifier369 = switchIdentifier();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, switchIdentifier369.Tree);
            	LPAR370=(IToken)Match(input,LPAR,FOLLOW_LPAR_in_switchDesignator4315); if (state.failed) return retval;
            	if ( state.backtracking == 0 )
            	{LPAR370_tree = (SimSharpTreeNode)adaptor.Create(LPAR370);
            		adaptor.AddChild(root_0, LPAR370_tree);
            	}
            	PushFollow(FOLLOW_subscriptExpression_in_switchDesignator4317);
            	subscriptExpression371 = subscriptExpression();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, subscriptExpression371.Tree);
            	RPAR372=(IToken)Match(input,RPAR,FOLLOW_RPAR_in_switchDesignator4319); if (state.failed) return retval;
            	if ( state.backtracking == 0 )
            	{RPAR372_tree = (SimSharpTreeNode)adaptor.Create(RPAR372);
            		adaptor.AddChild(root_0, RPAR372_tree);
            	}

            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "switchDesignator"

    public class subscriptList_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "subscriptList"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:724:1: subscriptList : subscriptExpression ( COMMA subscriptExpression )* ;
    public SimSharpParser.subscriptList_return subscriptList() // throws RecognitionException [1]
    {   
        SimSharpParser.subscriptList_return retval = new SimSharpParser.subscriptList_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken COMMA374 = null;
        SimSharpParser.subscriptExpression_return subscriptExpression373 = default(SimSharpParser.subscriptExpression_return);

        SimSharpParser.subscriptExpression_return subscriptExpression375 = default(SimSharpParser.subscriptExpression_return);


        SimSharpTreeNode COMMA374_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:725:2: ( subscriptExpression ( COMMA subscriptExpression )* )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:725:4: subscriptExpression ( COMMA subscriptExpression )*
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	PushFollow(FOLLOW_subscriptExpression_in_subscriptList4330);
            	subscriptExpression373 = subscriptExpression();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, subscriptExpression373.Tree);
            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:725:24: ( COMMA subscriptExpression )*
            	do 
            	{
            	    int alt93 = 2;
            	    int LA93_0 = input.LA(1);

            	    if ( (LA93_0 == COMMA) )
            	    {
            	        alt93 = 1;
            	    }


            	    switch (alt93) 
            		{
            			case 1 :
            			    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:725:26: COMMA subscriptExpression
            			    {
            			    	COMMA374=(IToken)Match(input,COMMA,FOLLOW_COMMA_in_subscriptList4334); if (state.failed) return retval;
            			    	if ( state.backtracking == 0 )
            			    	{COMMA374_tree = (SimSharpTreeNode)adaptor.Create(COMMA374);
            			    		adaptor.AddChild(root_0, COMMA374_tree);
            			    	}
            			    	PushFollow(FOLLOW_subscriptExpression_in_subscriptList4336);
            			    	subscriptExpression375 = subscriptExpression();
            			    	state.followingStackPointer--;
            			    	if (state.failed) return retval;
            			    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, subscriptExpression375.Tree);

            			    }
            			    break;

            			default:
            			    goto loop93;
            	    }
            	} while (true);

            	loop93:
            		;	// Stops C# compiler whining that label 'loop93' has no statements


            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "subscriptList"

    public class actualParameterPart_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "actualParameterPart"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:728:1: actualParameterPart : LPAR actualParameter ( COMMA actualParameter )* RPAR -> ^( ActualParameters ( actualParameter )+ ) ;
    public SimSharpParser.actualParameterPart_return actualParameterPart() // throws RecognitionException [1]
    {   
        SimSharpParser.actualParameterPart_return retval = new SimSharpParser.actualParameterPart_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken LPAR376 = null;
        IToken COMMA378 = null;
        IToken RPAR380 = null;
        SimSharpParser.actualParameter_return actualParameter377 = default(SimSharpParser.actualParameter_return);

        SimSharpParser.actualParameter_return actualParameter379 = default(SimSharpParser.actualParameter_return);


        SimSharpTreeNode LPAR376_tree=null;
        SimSharpTreeNode COMMA378_tree=null;
        SimSharpTreeNode RPAR380_tree=null;
        RewriteRuleTokenStream stream_RPAR = new RewriteRuleTokenStream(adaptor,"token RPAR");
        RewriteRuleTokenStream stream_LPAR = new RewriteRuleTokenStream(adaptor,"token LPAR");
        RewriteRuleTokenStream stream_COMMA = new RewriteRuleTokenStream(adaptor,"token COMMA");
        RewriteRuleSubtreeStream stream_actualParameter = new RewriteRuleSubtreeStream(adaptor,"rule actualParameter");
        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:729:2: ( LPAR actualParameter ( COMMA actualParameter )* RPAR -> ^( ActualParameters ( actualParameter )+ ) )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:729:4: LPAR actualParameter ( COMMA actualParameter )* RPAR
            {
            	LPAR376=(IToken)Match(input,LPAR,FOLLOW_LPAR_in_actualParameterPart4352); if (state.failed) return retval; 
            	if ( (state.backtracking==0) ) stream_LPAR.Add(LPAR376);

            	PushFollow(FOLLOW_actualParameter_in_actualParameterPart4354);
            	actualParameter377 = actualParameter();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( (state.backtracking==0) ) stream_actualParameter.Add(actualParameter377.Tree);
            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:729:25: ( COMMA actualParameter )*
            	do 
            	{
            	    int alt94 = 2;
            	    int LA94_0 = input.LA(1);

            	    if ( (LA94_0 == COMMA) )
            	    {
            	        alt94 = 1;
            	    }


            	    switch (alt94) 
            		{
            			case 1 :
            			    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:729:27: COMMA actualParameter
            			    {
            			    	COMMA378=(IToken)Match(input,COMMA,FOLLOW_COMMA_in_actualParameterPart4358); if (state.failed) return retval; 
            			    	if ( (state.backtracking==0) ) stream_COMMA.Add(COMMA378);

            			    	PushFollow(FOLLOW_actualParameter_in_actualParameterPart4360);
            			    	actualParameter379 = actualParameter();
            			    	state.followingStackPointer--;
            			    	if (state.failed) return retval;
            			    	if ( (state.backtracking==0) ) stream_actualParameter.Add(actualParameter379.Tree);

            			    }
            			    break;

            			default:
            			    goto loop94;
            	    }
            	} while (true);

            	loop94:
            		;	// Stops C# compiler whining that label 'loop94' has no statements

            	RPAR380=(IToken)Match(input,RPAR,FOLLOW_RPAR_in_actualParameterPart4365); if (state.failed) return retval; 
            	if ( (state.backtracking==0) ) stream_RPAR.Add(RPAR380);



            	// AST REWRITE
            	// elements:          actualParameter
            	// token labels:      
            	// rule labels:       retval
            	// token list labels: 
            	// rule list labels:  
            	// wildcard labels: 
            	if ( (state.backtracking==0) ) {
            	retval.Tree = root_0;
            	RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval!=null ? retval.Tree : null);

            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();
            	// 729:57: -> ^( ActualParameters ( actualParameter )+ )
            	{
            	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:729:61: ^( ActualParameters ( actualParameter )+ )
            	    {
            	    SimSharpTreeNode root_1 = (SimSharpTreeNode)adaptor.GetNilNode();
            	    root_1 = (SimSharpTreeNode)adaptor.BecomeRoot((SimSharpTreeNode)adaptor.Create(ActualParameters, "ActualParameters"), root_1);

            	    if ( !(stream_actualParameter.HasNext()) ) {
            	        throw new RewriteEarlyExitException();
            	    }
            	    while ( stream_actualParameter.HasNext() )
            	    {
            	        adaptor.AddChild(root_1, stream_actualParameter.NextTree());

            	    }
            	    stream_actualParameter.Reset();

            	    adaptor.AddChild(root_0, root_1);
            	    }

            	}

            	retval.Tree = root_0;retval.Tree = root_0;}
            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "actualParameterPart"

    public class actualParameter_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "actualParameter"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:732:1: actualParameter : expression ;
    public SimSharpParser.actualParameter_return actualParameter() // throws RecognitionException [1]
    {   
        SimSharpParser.actualParameter_return retval = new SimSharpParser.actualParameter_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        SimSharpParser.expression_return expression381 = default(SimSharpParser.expression_return);



        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:733:2: ( expression )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:733:4: expression
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	PushFollow(FOLLOW_expression_in_actualParameter4386);
            	expression381 = expression();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, expression381.Tree);

            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "actualParameter"

    public class objectGenerator_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "objectGenerator"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:739:1: objectGenerator : NEW classIdentifier ( ( LPAR )=> actualParameterPart )? ;
    public SimSharpParser.objectGenerator_return objectGenerator() // throws RecognitionException [1]
    {   
        SimSharpParser.objectGenerator_return retval = new SimSharpParser.objectGenerator_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken NEW382 = null;
        SimSharpParser.classIdentifier_return classIdentifier383 = default(SimSharpParser.classIdentifier_return);

        SimSharpParser.actualParameterPart_return actualParameterPart384 = default(SimSharpParser.actualParameterPart_return);


        SimSharpTreeNode NEW382_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:740:2: ( NEW classIdentifier ( ( LPAR )=> actualParameterPart )? )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:740:4: NEW classIdentifier ( ( LPAR )=> actualParameterPart )?
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	NEW382=(IToken)Match(input,NEW,FOLLOW_NEW_in_objectGenerator4399); if (state.failed) return retval;
            	if ( state.backtracking == 0 )
            	{NEW382_tree = (SimSharpTreeNode)adaptor.Create(NEW382);
            		root_0 = (SimSharpTreeNode)adaptor.BecomeRoot(NEW382_tree, root_0);
            	}
            	PushFollow(FOLLOW_classIdentifier_in_objectGenerator4402);
            	classIdentifier383 = classIdentifier();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, classIdentifier383.Tree);
            	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:740:25: ( ( LPAR )=> actualParameterPart )?
            	int alt95 = 2;
            	alt95 = dfa95.Predict(input);
            	switch (alt95) 
            	{
            	    case 1 :
            	        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:740:27: ( LPAR )=> actualParameterPart
            	        {
            	        	PushFollow(FOLLOW_actualParameterPart_in_objectGenerator4412);
            	        	actualParameterPart384 = actualParameterPart();
            	        	state.followingStackPointer--;
            	        	if (state.failed) return retval;
            	        	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, actualParameterPart384.Tree);

            	        }
            	        break;

            	}


            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "objectGenerator"

    public class localObject_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "localObject"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:743:1: localObject : THIS classIdentifier ;
    public SimSharpParser.localObject_return localObject() // throws RecognitionException [1]
    {   
        SimSharpParser.localObject_return retval = new SimSharpParser.localObject_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken THIS385 = null;
        SimSharpParser.classIdentifier_return classIdentifier386 = default(SimSharpParser.classIdentifier_return);


        SimSharpTreeNode THIS385_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:744:2: ( THIS classIdentifier )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:744:4: THIS classIdentifier
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	THIS385=(IToken)Match(input,THIS,FOLLOW_THIS_in_localObject4427); if (state.failed) return retval;
            	if ( state.backtracking == 0 )
            	{THIS385_tree = (SimSharpTreeNode)adaptor.Create(THIS385);
            		root_0 = (SimSharpTreeNode)adaptor.BecomeRoot(THIS385_tree, root_0);
            	}
            	PushFollow(FOLLOW_classIdentifier_in_localObject4430);
            	classIdentifier386 = classIdentifier();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, classIdentifier386.Tree);

            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "localObject"

    public class switchIdentifier_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "switchIdentifier"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:748:1: switchIdentifier : ID ;
    public SimSharpParser.switchIdentifier_return switchIdentifier() // throws RecognitionException [1]
    {   
        SimSharpParser.switchIdentifier_return retval = new SimSharpParser.switchIdentifier_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken ID387 = null;

        SimSharpTreeNode ID387_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:749:2: ( ID )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:749:5: ID
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	ID387=(IToken)Match(input,ID,FOLLOW_ID_in_switchIdentifier4445); if (state.failed) return retval;
            	if ( state.backtracking == 0 )
            	{ID387_tree = (SimSharpTreeNode)adaptor.Create(ID387);
            		adaptor.AddChild(root_0, ID387_tree);
            	}

            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "switchIdentifier"

    public class label_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "label"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:752:1: label : ID ;
    public SimSharpParser.label_return label() // throws RecognitionException [1]
    {   
        SimSharpParser.label_return retval = new SimSharpParser.label_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken ID388 = null;

        SimSharpTreeNode ID388_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:752:7: ( ID )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:752:9: ID
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	ID388=(IToken)Match(input,ID,FOLLOW_ID_in_label4455); if (state.failed) return retval;
            	if ( state.backtracking == 0 )
            	{ID388_tree = (SimSharpTreeNode)adaptor.Create(ID388);
            		adaptor.AddChild(root_0, ID388_tree);
            	}

            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "label"

    public class type_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "type"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:759:1: type : ( valType -> ^( Type valType ) | refType -> ^( Type refType ) );
    public SimSharpParser.type_return type() // throws RecognitionException [1]
    {   
        SimSharpParser.type_return retval = new SimSharpParser.type_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        SimSharpParser.valType_return valType389 = default(SimSharpParser.valType_return);

        SimSharpParser.refType_return refType390 = default(SimSharpParser.refType_return);


        RewriteRuleSubtreeStream stream_valType = new RewriteRuleSubtreeStream(adaptor,"rule valType");
        RewriteRuleSubtreeStream stream_refType = new RewriteRuleSubtreeStream(adaptor,"rule refType");
        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:759:6: ( valType -> ^( Type valType ) | refType -> ^( Type refType ) )
            int alt96 = 2;
            int LA96_0 = input.LA(1);

            if ( ((LA96_0 >= BOOLEAN && LA96_0 <= LONG)) )
            {
                alt96 = 1;
            }
            else if ( ((LA96_0 >= TEXT && LA96_0 <= REF)) )
            {
                alt96 = 2;
            }
            else 
            {
                if ( state.backtracking > 0 ) {state.failed = true; return retval;}
                NoViableAltException nvae_d96s0 =
                    new NoViableAltException("", 96, 0, input);

                throw nvae_d96s0;
            }
            switch (alt96) 
            {
                case 1 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:759:8: valType
                    {
                    	PushFollow(FOLLOW_valType_in_type4469);
                    	valType389 = valType();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( (state.backtracking==0) ) stream_valType.Add(valType389.Tree);


                    	// AST REWRITE
                    	// elements:          valType
                    	// token labels:      
                    	// rule labels:       retval
                    	// token list labels: 
                    	// rule list labels:  
                    	// wildcard labels: 
                    	if ( (state.backtracking==0) ) {
                    	retval.Tree = root_0;
                    	RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval!=null ? retval.Tree : null);

                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();
                    	// 759:16: -> ^( Type valType )
                    	{
                    	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:759:19: ^( Type valType )
                    	    {
                    	    SimSharpTreeNode root_1 = (SimSharpTreeNode)adaptor.GetNilNode();
                    	    root_1 = (SimSharpTreeNode)adaptor.BecomeRoot((SimSharpTreeNode)adaptor.Create(Type, "Type"), root_1);

                    	    adaptor.AddChild(root_1, stream_valType.NextTree());

                    	    adaptor.AddChild(root_0, root_1);
                    	    }

                    	}

                    	retval.Tree = root_0;retval.Tree = root_0;}
                    }
                    break;
                case 2 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:760:4: refType
                    {
                    	PushFollow(FOLLOW_refType_in_type4483);
                    	refType390 = refType();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( (state.backtracking==0) ) stream_refType.Add(refType390.Tree);


                    	// AST REWRITE
                    	// elements:          refType
                    	// token labels:      
                    	// rule labels:       retval
                    	// token list labels: 
                    	// rule list labels:  
                    	// wildcard labels: 
                    	if ( (state.backtracking==0) ) {
                    	retval.Tree = root_0;
                    	RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval!=null ? retval.Tree : null);

                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();
                    	// 760:12: -> ^( Type refType )
                    	{
                    	    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:760:15: ^( Type refType )
                    	    {
                    	    SimSharpTreeNode root_1 = (SimSharpTreeNode)adaptor.GetNilNode();
                    	    root_1 = (SimSharpTreeNode)adaptor.BecomeRoot((SimSharpTreeNode)adaptor.Create(Type, "Type"), root_1);

                    	    adaptor.AddChild(root_1, stream_refType.NextTree());

                    	    adaptor.AddChild(root_0, root_1);
                    	    }

                    	}

                    	retval.Tree = root_0;retval.Tree = root_0;}
                    }
                    break;

            }
            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "type"

    public class valType_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "valType"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:763:1: valType : ( aritmeticType | BOOLEAN | CHARACTER );
    public SimSharpParser.valType_return valType() // throws RecognitionException [1]
    {   
        SimSharpParser.valType_return retval = new SimSharpParser.valType_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken BOOLEAN392 = null;
        IToken CHARACTER393 = null;
        SimSharpParser.aritmeticType_return aritmeticType391 = default(SimSharpParser.aritmeticType_return);


        SimSharpTreeNode BOOLEAN392_tree=null;
        SimSharpTreeNode CHARACTER393_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:763:9: ( aritmeticType | BOOLEAN | CHARACTER )
            int alt97 = 3;
            switch ( input.LA(1) ) 
            {
            case INTEGER:
            case SHORT:
            case REAL:
            case LONG:
            	{
                alt97 = 1;
                }
                break;
            case BOOLEAN:
            	{
                alt97 = 2;
                }
                break;
            case CHARACTER:
            	{
                alt97 = 3;
                }
                break;
            	default:
            	    if ( state.backtracking > 0 ) {state.failed = true; return retval;}
            	    NoViableAltException nvae_d97s0 =
            	        new NoViableAltException("", 97, 0, input);

            	    throw nvae_d97s0;
            }

            switch (alt97) 
            {
                case 1 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:763:11: aritmeticType
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	PushFollow(FOLLOW_aritmeticType_in_valType4501);
                    	aritmeticType391 = aritmeticType();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, aritmeticType391.Tree);

                    }
                    break;
                case 2 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:764:4: BOOLEAN
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	BOOLEAN392=(IToken)Match(input,BOOLEAN,FOLLOW_BOOLEAN_in_valType4506); if (state.failed) return retval;
                    	if ( state.backtracking == 0 )
                    	{BOOLEAN392_tree = (SimSharpTreeNode)adaptor.Create(BOOLEAN392);
                    		adaptor.AddChild(root_0, BOOLEAN392_tree);
                    	}

                    }
                    break;
                case 3 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:765:4: CHARACTER
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	CHARACTER393=(IToken)Match(input,CHARACTER,FOLLOW_CHARACTER_in_valType4511); if (state.failed) return retval;
                    	if ( state.backtracking == 0 )
                    	{CHARACTER393_tree = (SimSharpTreeNode)adaptor.Create(CHARACTER393);
                    		adaptor.AddChild(root_0, CHARACTER393_tree);
                    	}

                    }
                    break;

            }
            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "valType"

    public class aritmeticType_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "aritmeticType"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:768:1: aritmeticType : ( integerType | realType );
    public SimSharpParser.aritmeticType_return aritmeticType() // throws RecognitionException [1]
    {   
        SimSharpParser.aritmeticType_return retval = new SimSharpParser.aritmeticType_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        SimSharpParser.integerType_return integerType394 = default(SimSharpParser.integerType_return);

        SimSharpParser.realType_return realType395 = default(SimSharpParser.realType_return);



        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:769:2: ( integerType | realType )
            int alt98 = 2;
            int LA98_0 = input.LA(1);

            if ( ((LA98_0 >= INTEGER && LA98_0 <= SHORT)) )
            {
                alt98 = 1;
            }
            else if ( ((LA98_0 >= REAL && LA98_0 <= LONG)) )
            {
                alt98 = 2;
            }
            else 
            {
                if ( state.backtracking > 0 ) {state.failed = true; return retval;}
                NoViableAltException nvae_d98s0 =
                    new NoViableAltException("", 98, 0, input);

                throw nvae_d98s0;
            }
            switch (alt98) 
            {
                case 1 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:769:4: integerType
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	PushFollow(FOLLOW_integerType_in_aritmeticType4522);
                    	integerType394 = integerType();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, integerType394.Tree);

                    }
                    break;
                case 2 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:770:4: realType
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	PushFollow(FOLLOW_realType_in_aritmeticType4527);
                    	realType395 = realType();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, realType395.Tree);

                    }
                    break;

            }
            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "aritmeticType"

    public class integerType_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "integerType"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:773:1: integerType : ( INTEGER | SHORT INTEGER );
    public SimSharpParser.integerType_return integerType() // throws RecognitionException [1]
    {   
        SimSharpParser.integerType_return retval = new SimSharpParser.integerType_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken INTEGER396 = null;
        IToken SHORT397 = null;
        IToken INTEGER398 = null;

        SimSharpTreeNode INTEGER396_tree=null;
        SimSharpTreeNode SHORT397_tree=null;
        SimSharpTreeNode INTEGER398_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:774:2: ( INTEGER | SHORT INTEGER )
            int alt99 = 2;
            int LA99_0 = input.LA(1);

            if ( (LA99_0 == INTEGER) )
            {
                alt99 = 1;
            }
            else if ( (LA99_0 == SHORT) )
            {
                alt99 = 2;
            }
            else 
            {
                if ( state.backtracking > 0 ) {state.failed = true; return retval;}
                NoViableAltException nvae_d99s0 =
                    new NoViableAltException("", 99, 0, input);

                throw nvae_d99s0;
            }
            switch (alt99) 
            {
                case 1 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:774:4: INTEGER
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	INTEGER396=(IToken)Match(input,INTEGER,FOLLOW_INTEGER_in_integerType4539); if (state.failed) return retval;
                    	if ( state.backtracking == 0 )
                    	{INTEGER396_tree = (SimSharpTreeNode)adaptor.Create(INTEGER396);
                    		adaptor.AddChild(root_0, INTEGER396_tree);
                    	}

                    }
                    break;
                case 2 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:775:4: SHORT INTEGER
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	SHORT397=(IToken)Match(input,SHORT,FOLLOW_SHORT_in_integerType4553); if (state.failed) return retval;
                    	if ( state.backtracking == 0 )
                    	{SHORT397_tree = (SimSharpTreeNode)adaptor.Create(SHORT397);
                    		adaptor.AddChild(root_0, SHORT397_tree);
                    	}
                    	INTEGER398=(IToken)Match(input,INTEGER,FOLLOW_INTEGER_in_integerType4555); if (state.failed) return retval;

                    }
                    break;

            }
            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "integerType"

    public class realType_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "realType"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:778:1: realType : ( REAL | LONG REAL );
    public SimSharpParser.realType_return realType() // throws RecognitionException [1]
    {   
        SimSharpParser.realType_return retval = new SimSharpParser.realType_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken REAL399 = null;
        IToken LONG400 = null;
        IToken REAL401 = null;

        SimSharpTreeNode REAL399_tree=null;
        SimSharpTreeNode LONG400_tree=null;
        SimSharpTreeNode REAL401_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:779:2: ( REAL | LONG REAL )
            int alt100 = 2;
            int LA100_0 = input.LA(1);

            if ( (LA100_0 == REAL) )
            {
                alt100 = 1;
            }
            else if ( (LA100_0 == LONG) )
            {
                alt100 = 2;
            }
            else 
            {
                if ( state.backtracking > 0 ) {state.failed = true; return retval;}
                NoViableAltException nvae_d100s0 =
                    new NoViableAltException("", 100, 0, input);

                throw nvae_d100s0;
            }
            switch (alt100) 
            {
                case 1 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:779:4: REAL
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	REAL399=(IToken)Match(input,REAL,FOLLOW_REAL_in_realType4569); if (state.failed) return retval;
                    	if ( state.backtracking == 0 )
                    	{REAL399_tree = (SimSharpTreeNode)adaptor.Create(REAL399);
                    		adaptor.AddChild(root_0, REAL399_tree);
                    	}

                    }
                    break;
                case 2 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:780:4: LONG REAL
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	LONG400=(IToken)Match(input,LONG,FOLLOW_LONG_in_realType4574); if (state.failed) return retval;
                    	if ( state.backtracking == 0 )
                    	{LONG400_tree = (SimSharpTreeNode)adaptor.Create(LONG400);
                    		adaptor.AddChild(root_0, LONG400_tree);
                    	}
                    	REAL401=(IToken)Match(input,REAL,FOLLOW_REAL_in_realType4576); if (state.failed) return retval;

                    }
                    break;

            }
            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "realType"

    public class refType_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "refType"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:783:1: refType : ( objectRefType | TEXT );
    public SimSharpParser.refType_return refType() // throws RecognitionException [1]
    {   
        SimSharpParser.refType_return retval = new SimSharpParser.refType_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken TEXT403 = null;
        SimSharpParser.objectRefType_return objectRefType402 = default(SimSharpParser.objectRefType_return);


        SimSharpTreeNode TEXT403_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:783:9: ( objectRefType | TEXT )
            int alt101 = 2;
            int LA101_0 = input.LA(1);

            if ( (LA101_0 == REF) )
            {
                alt101 = 1;
            }
            else if ( (LA101_0 == TEXT) )
            {
                alt101 = 2;
            }
            else 
            {
                if ( state.backtracking > 0 ) {state.failed = true; return retval;}
                NoViableAltException nvae_d101s0 =
                    new NoViableAltException("", 101, 0, input);

                throw nvae_d101s0;
            }
            switch (alt101) 
            {
                case 1 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:783:11: objectRefType
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	PushFollow(FOLLOW_objectRefType_in_refType4590);
                    	objectRefType402 = objectRefType();
                    	state.followingStackPointer--;
                    	if (state.failed) return retval;
                    	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, objectRefType402.Tree);

                    }
                    break;
                case 2 :
                    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:784:4: TEXT
                    {
                    	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

                    	TEXT403=(IToken)Match(input,TEXT,FOLLOW_TEXT_in_refType4595); if (state.failed) return retval;
                    	if ( state.backtracking == 0 )
                    	{TEXT403_tree = (SimSharpTreeNode)adaptor.Create(TEXT403);
                    		adaptor.AddChild(root_0, TEXT403_tree);
                    	}

                    }
                    break;

            }
            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "refType"

    public class objectRefType_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "objectRefType"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:787:1: objectRefType : REF '(' qualification ')' ;
    public SimSharpParser.objectRefType_return objectRefType() // throws RecognitionException [1]
    {   
        SimSharpParser.objectRefType_return retval = new SimSharpParser.objectRefType_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken REF404 = null;
        IToken char_literal405 = null;
        IToken char_literal407 = null;
        SimSharpParser.qualification_return qualification406 = default(SimSharpParser.qualification_return);


        SimSharpTreeNode REF404_tree=null;
        SimSharpTreeNode char_literal405_tree=null;
        SimSharpTreeNode char_literal407_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:788:2: ( REF '(' qualification ')' )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:788:4: REF '(' qualification ')'
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	REF404=(IToken)Match(input,REF,FOLLOW_REF_in_objectRefType4606); if (state.failed) return retval;
            	if ( state.backtracking == 0 )
            	{REF404_tree = (SimSharpTreeNode)adaptor.Create(REF404);
            		adaptor.AddChild(root_0, REF404_tree);
            	}
            	char_literal405=(IToken)Match(input,LPAR,FOLLOW_LPAR_in_objectRefType4608); if (state.failed) return retval;
            	PushFollow(FOLLOW_qualification_in_objectRefType4611);
            	qualification406 = qualification();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, qualification406.Tree);
            	char_literal407=(IToken)Match(input,RPAR,FOLLOW_RPAR_in_objectRefType4613); if (state.failed) return retval;

            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "objectRefType"

    public class qualification_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "qualification"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:791:1: qualification : classIdentifier ;
    public SimSharpParser.qualification_return qualification() // throws RecognitionException [1]
    {   
        SimSharpParser.qualification_return retval = new SimSharpParser.qualification_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        SimSharpParser.classIdentifier_return classIdentifier408 = default(SimSharpParser.classIdentifier_return);



        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:792:2: ( classIdentifier )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:792:4: classIdentifier
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	PushFollow(FOLLOW_classIdentifier_in_qualification4627);
            	classIdentifier408 = classIdentifier();
            	state.followingStackPointer--;
            	if (state.failed) return retval;
            	if ( state.backtracking == 0 ) adaptor.AddChild(root_0, classIdentifier408.Tree);

            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "qualification"

    public class logicalValue_return : ParserRuleReturnScope
    {
        private SimSharpTreeNode tree;
        override public object Tree
        {
        	get { return tree; }
        	set { tree = (SimSharpTreeNode) value; }
        }
    };

    // $ANTLR start "logicalValue"
    // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:795:1: logicalValue : ( TRUE | FALSE );
    public SimSharpParser.logicalValue_return logicalValue() // throws RecognitionException [1]
    {   
        SimSharpParser.logicalValue_return retval = new SimSharpParser.logicalValue_return();
        retval.Start = input.LT(1);

        SimSharpTreeNode root_0 = null;

        IToken set409 = null;

        SimSharpTreeNode set409_tree=null;

        try 
    	{
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:796:2: ( TRUE | FALSE )
            // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:
            {
            	root_0 = (SimSharpTreeNode)adaptor.GetNilNode();

            	set409 = (IToken)input.LT(1);
            	if ( (input.LA(1) >= TRUE && input.LA(1) <= FALSE) ) 
            	{
            	    input.Consume();
            	    if ( state.backtracking == 0 ) adaptor.AddChild(root_0, (SimSharpTreeNode)adaptor.Create(set409));
            	    state.errorRecovery = false;state.failed = false;
            	}
            	else 
            	{
            	    if ( state.backtracking > 0 ) {state.failed = true; return retval;}
            	    MismatchedSetException mse = new MismatchedSetException(null,input);
            	    throw mse;
            	}


            }

            retval.Stop = input.LT(-1);

            if ( (state.backtracking==0) )
            {	retval.Tree = (SimSharpTreeNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);}
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (SimSharpTreeNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR end "logicalValue"

    // $ANTLR start "synpred1_SimSharp"
    public void synpred1_SimSharp_fragment() {
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:137:38: ( ( ID )? CLASS )
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:137:39: ( ID )? CLASS
        {
        	// C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:137:39: ( ID )?
        	int alt102 = 2;
        	int LA102_0 = input.LA(1);

        	if ( (LA102_0 == ID) )
        	{
        	    alt102 = 1;
        	}
        	switch (alt102) 
        	{
        	    case 1 :
        	        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:137:40: ID
        	        {
        	        	Match(input,ID,FOLLOW_ID_in_synpred1_SimSharp678); if (state.failed) return ;

        	        }
        	        break;

        	}

        	Match(input,CLASS,FOLLOW_CLASS_in_synpred1_SimSharp682); if (state.failed) return ;

        }
    }
    // $ANTLR end "synpred1_SimSharp"

    // $ANTLR start "synpred2_SimSharp"
    public void synpred2_SimSharp_fragment() {
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:147:12: ( EXTERNAL CLASS )
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:147:13: EXTERNAL CLASS
        {
        	Match(input,EXTERNAL,FOLLOW_EXTERNAL_in_synpred2_SimSharp753); if (state.failed) return ;
        	Match(input,CLASS,FOLLOW_CLASS_in_synpred2_SimSharp755); if (state.failed) return ;

        }
    }
    // $ANTLR end "synpred2_SimSharp"

    // $ANTLR start "synpred3_SimSharp"
    public void synpred3_SimSharp_fragment() {
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:233:5: ( label COLON )
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:233:6: label COLON
        {
        	PushFollow(FOLLOW_label_in_synpred3_SimSharp1088);
        	label();
        	state.followingStackPointer--;
        	if (state.failed) return ;
        	Match(input,COLON,FOLLOW_COLON_in_synpred3_SimSharp1090); if (state.failed) return ;

        }
    }
    // $ANTLR end "synpred3_SimSharp"

    // $ANTLR start "synpred4_SimSharp"
    public void synpred4_SimSharp_fragment() {
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:239:4: ( prefixedBlock )
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:239:5: prefixedBlock
        {
        	PushFollow(FOLLOW_prefixedBlock_in_synpred4_SimSharp1153);
        	prefixedBlock();
        	state.followingStackPointer--;
        	if (state.failed) return ;

        }
    }
    // $ANTLR end "synpred4_SimSharp"

    // $ANTLR start "synpred5_SimSharp"
    public void synpred5_SimSharp_fragment() {
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:240:4: ( objectGenerator ( SCOLON | END ) )
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:240:5: objectGenerator ( SCOLON | END )
        {
        	PushFollow(FOLLOW_objectGenerator_in_synpred5_SimSharp1164);
        	objectGenerator();
        	state.followingStackPointer--;
        	if (state.failed) return ;
        	if ( input.LA(1) == SCOLON || input.LA(1) == END ) 
        	{
        	    input.Consume();
        	    state.errorRecovery = false;state.failed = false;
        	}
        	else 
        	{
        	    if ( state.backtracking > 0 ) {state.failed = true; return ;}
        	    MismatchedSetException mse = new MismatchedSetException(null,input);
        	    throw mse;
        	}


        }
    }
    // $ANTLR end "synpred5_SimSharp"

    // $ANTLR start "synpred6_SimSharp"
    public void synpred6_SimSharp_fragment() {
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:241:4: ( assignmentStatement )
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:241:5: assignmentStatement
        {
        	PushFollow(FOLLOW_assignmentStatement_in_synpred6_SimSharp1181);
        	assignmentStatement();
        	state.followingStackPointer--;
        	if (state.failed) return ;

        }
    }
    // $ANTLR end "synpred6_SimSharp"

    // $ANTLR start "synpred8_SimSharp"
    public void synpred8_SimSharp_fragment() {
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:263:6: ( assignmentStatement )
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:263:7: assignmentStatement
        {
        	PushFollow(FOLLOW_assignmentStatement_in_synpred8_SimSharp1425);
        	assignmentStatement();
        	state.followingStackPointer--;
        	if (state.failed) return ;

        }
    }
    // $ANTLR end "synpred8_SimSharp"

    // $ANTLR start "synpred9_SimSharp"
    public void synpred9_SimSharp_fragment() {
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:280:54: ( ELSE )
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:280:55: ELSE
        {
        	Match(input,ELSE,FOLLOW_ELSE_in_synpred9_SimSharp1529); if (state.failed) return ;

        }
    }
    // $ANTLR end "synpred9_SimSharp"

    // $ANTLR start "synpred10_SimSharp"
    public void synpred10_SimSharp_fragment() {
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:324:47: ( whenClause )
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:324:48: whenClause
        {
        	PushFollow(FOLLOW_whenClause_in_synpred10_SimSharp1855);
        	whenClause();
        	state.followingStackPointer--;
        	if (state.failed) return ;

        }
    }
    // $ANTLR end "synpred10_SimSharp"

    // $ANTLR start "synpred11_SimSharp"
    public void synpred11_SimSharp_fragment() {
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:324:79: ( otherwiseClause )
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:324:80: otherwiseClause
        {
        	PushFollow(FOLLOW_otherwiseClause_in_synpred11_SimSharp1868);
        	otherwiseClause();
        	state.followingStackPointer--;
        	if (state.failed) return ;

        }
    }
    // $ANTLR end "synpred11_SimSharp"

    // $ANTLR start "synpred12_SimSharp"
    public void synpred12_SimSharp_fragment() {
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:325:32: ( otherwiseClause )
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:325:33: otherwiseClause
        {
        	PushFollow(FOLLOW_otherwiseClause_in_synpred12_SimSharp1896);
        	otherwiseClause();
        	state.followingStackPointer--;
        	if (state.failed) return ;

        }
    }
    // $ANTLR end "synpred12_SimSharp"

    // $ANTLR start "synpred13_SimSharp"
    public void synpred13_SimSharp_fragment() {
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:352:9: ( BEGIN declaration )
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:352:10: BEGIN declaration
        {
        	Match(input,BEGIN,FOLLOW_BEGIN_in_synpred13_SimSharp2056); if (state.failed) return ;
        	PushFollow(FOLLOW_declaration_in_synpred13_SimSharp2058);
        	declaration();
        	state.followingStackPointer--;
        	if (state.failed) return ;

        }
    }
    // $ANTLR end "synpred13_SimSharp"

    // $ANTLR start "synpred14_SimSharp"
    public void synpred14_SimSharp_fragment() {
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:361:25: ( SCOLON declaration )
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:361:26: SCOLON declaration
        {
        	Match(input,SCOLON,FOLLOW_SCOLON_in_synpred14_SimSharp2115); if (state.failed) return ;
        	PushFollow(FOLLOW_declaration_in_synpred14_SimSharp2117);
        	declaration();
        	state.followingStackPointer--;
        	if (state.failed) return ;

        }
    }
    // $ANTLR end "synpred14_SimSharp"

    // $ANTLR start "synpred15_SimSharp"
    public void synpred15_SimSharp_fragment() {
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:413:4: ( ID EQ )
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:413:5: ID EQ
        {
        	Match(input,ID,FOLLOW_ID_in_synpred15_SimSharp2339); if (state.failed) return ;
        	Match(input,EQ,FOLLOW_EQ_in_synpred15_SimSharp2341); if (state.failed) return ;

        }
    }
    // $ANTLR end "synpred15_SimSharp"

    // $ANTLR start "synpred16_SimSharp"
    public void synpred16_SimSharp_fragment() {
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:471:31: ( SCOLON specifier )
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:471:32: SCOLON specifier
        {
        	Match(input,SCOLON,FOLLOW_SCOLON_in_synpred16_SimSharp2708); if (state.failed) return ;
        	PushFollow(FOLLOW_specifier_in_synpred16_SimSharp2710);
        	specifier();
        	state.followingStackPointer--;
        	if (state.failed) return ;

        }
    }
    // $ANTLR end "synpred16_SimSharp"

    // $ANTLR start "synpred17_SimSharp"
    public void synpred17_SimSharp_fragment() {
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:529:4: ( statement )
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:529:5: statement
        {
        	PushFollow(FOLLOW_statement_in_synpred17_SimSharp3115);
        	statement();
        	state.followingStackPointer--;
        	if (state.failed) return ;

        }
    }
    // $ANTLR end "synpred17_SimSharp"

    // $ANTLR start "synpred18_SimSharp"
    public void synpred18_SimSharp_fragment() {
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:529:30: ( SCOLON statement )
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:529:31: SCOLON statement
        {
        	Match(input,SCOLON,FOLLOW_SCOLON_in_synpred18_SimSharp3124); if (state.failed) return ;
        	PushFollow(FOLLOW_statement_in_synpred18_SimSharp3126);
        	statement();
        	state.followingStackPointer--;
        	if (state.failed) return ;

        }
    }
    // $ANTLR end "synpred18_SimSharp"

    // $ANTLR start "synpred19_SimSharp"
    public void synpred19_SimSharp_fragment() {
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:530:17: ( SCOLON declaration )
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:530:18: SCOLON declaration
        {
        	Match(input,SCOLON,FOLLOW_SCOLON_in_synpred19_SimSharp3153); if (state.failed) return ;
        	PushFollow(FOLLOW_declaration_in_synpred19_SimSharp3155);
        	declaration();
        	state.followingStackPointer--;
        	if (state.failed) return ;

        }
    }
    // $ANTLR end "synpred19_SimSharp"

    // $ANTLR start "synpred20_SimSharp"
    public void synpred20_SimSharp_fragment() {
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:530:63: ( SCOLON statement )
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:530:64: SCOLON statement
        {
        	Match(input,SCOLON,FOLLOW_SCOLON_in_synpred20_SimSharp3168); if (state.failed) return ;
        	PushFollow(FOLLOW_statement_in_synpred20_SimSharp3170);
        	statement();
        	state.followingStackPointer--;
        	if (state.failed) return ;

        }
    }
    // $ANTLR end "synpred20_SimSharp"

    // $ANTLR start "synpred21_SimSharp"
    public void synpred21_SimSharp_fragment() {
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:549:30: ( SCOLON ( HIDDEN | PROTECTED ) )
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:549:31: SCOLON ( HIDDEN | PROTECTED )
        {
        	Match(input,SCOLON,FOLLOW_SCOLON_in_synpred21_SimSharp3290); if (state.failed) return ;
        	if ( (input.LA(1) >= HIDDEN && input.LA(1) <= PROTECTED) ) 
        	{
        	    input.Consume();
        	    state.errorRecovery = false;state.failed = false;
        	}
        	else 
        	{
        	    if ( state.backtracking > 0 ) {state.failed = true; return ;}
        	    MismatchedSetException mse = new MismatchedSetException(null,input);
        	    throw mse;
        	}


        }
    }
    // $ANTLR end "synpred21_SimSharp"

    // $ANTLR start "synpred22_SimSharp"
    public void synpred22_SimSharp_fragment() {
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:576:4: ( ID LPAR )
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:576:5: ID LPAR
        {
        	Match(input,ID,FOLLOW_ID_in_synpred22_SimSharp3448); if (state.failed) return ;
        	Match(input,LPAR,FOLLOW_LPAR_in_synpred22_SimSharp3450); if (state.failed) return ;

        }
    }
    // $ANTLR end "synpred22_SimSharp"

    // $ANTLR start "synpred23_SimSharp"
    public void synpred23_SimSharp_fragment() {
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:609:4: ( booleanTertiary OR ELSE )
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:609:5: booleanTertiary OR ELSE
        {
        	PushFollow(FOLLOW_booleanTertiary_in_synpred23_SimSharp3579);
        	booleanTertiary();
        	state.followingStackPointer--;
        	if (state.failed) return ;
        	Match(input,OR,FOLLOW_OR_in_synpred23_SimSharp3581); if (state.failed) return ;
        	Match(input,ELSE,FOLLOW_ELSE_in_synpred23_SimSharp3583); if (state.failed) return ;

        }
    }
    // $ANTLR end "synpred23_SimSharp"

    // $ANTLR start "synpred24_SimSharp"
    public void synpred24_SimSharp_fragment() {
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:614:4: ( equivalence AND THEN )
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:614:5: equivalence AND THEN
        {
        	PushFollow(FOLLOW_equivalence_in_synpred24_SimSharp3628);
        	equivalence();
        	state.followingStackPointer--;
        	if (state.failed) return ;
        	Match(input,AND,FOLLOW_AND_in_synpred24_SimSharp3630); if (state.failed) return ;
        	Match(input,THEN,FOLLOW_THEN_in_synpred24_SimSharp3632); if (state.failed) return ;

        }
    }
    // $ANTLR end "synpred24_SimSharp"

    // $ANTLR start "synpred25_SimSharp"
    public void synpred25_SimSharp_fragment() {
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:627:20: ( OR ~ ELSE )
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:627:21: OR ~ ELSE
        {
        	Match(input,OR,FOLLOW_OR_in_synpred25_SimSharp3723); if (state.failed) return ;
        	if ( (input.LA(1) >= SimulaSourceModule && input.LA(1) <= DELAY) || (input.LA(1) >= IF && input.LA(1) <= Z) ) 
        	{
        	    input.Consume();
        	    state.errorRecovery = false;state.failed = false;
        	}
        	else 
        	{
        	    if ( state.backtracking > 0 ) {state.failed = true; return ;}
        	    MismatchedSetException mse = new MismatchedSetException(null,input);
        	    throw mse;
        	}


        }
    }
    // $ANTLR end "synpred25_SimSharp"

    // $ANTLR start "synpred26_SimSharp"
    public void synpred26_SimSharp_fragment() {
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:631:23: ( AND ~ THEN )
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:631:24: AND ~ THEN
        {
        	Match(input,AND,FOLLOW_AND_in_synpred26_SimSharp3754); if (state.failed) return ;
        	if ( (input.LA(1) >= SimulaSourceModule && input.LA(1) <= IF) || (input.LA(1) >= WHILE && input.LA(1) <= Z) ) 
        	{
        	    input.Consume();
        	    state.errorRecovery = false;state.failed = false;
        	}
        	else 
        	{
        	    if ( state.backtracking > 0 ) {state.failed = true; return ;}
        	    MismatchedSetException mse = new MismatchedSetException(null,input);
        	    throw mse;
        	}


        }
    }
    // $ANTLR end "synpred26_SimSharp"

    // $ANTLR start "synpred27_SimSharp"
    public void synpred27_SimSharp_fragment() {
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:740:27: ( LPAR )
        // C:\\work\\simsharp\\Src\\Ssc\\SimSharp.g:740:28: LPAR
        {
        	Match(input,LPAR,FOLLOW_LPAR_in_synpred27_SimSharp4407); if (state.failed) return ;

        }
    }
    // $ANTLR end "synpred27_SimSharp"

    // Delegated rules

   	public bool synpred2_SimSharp() 
   	{
   	    state.backtracking++;
   	    int start = input.Mark();
   	    try 
   	    {
   	        synpred2_SimSharp_fragment(); // can never throw exception
   	    }
   	    catch (RecognitionException re) 
   	    {
   	        Console.Error.WriteLine("impossible: "+re);
   	    }
   	    bool success = !state.failed;
   	    input.Rewind(start);
   	    state.backtracking--;
   	    state.failed = false;
   	    return success;
   	}
   	public bool synpred14_SimSharp() 
   	{
   	    state.backtracking++;
   	    int start = input.Mark();
   	    try 
   	    {
   	        synpred14_SimSharp_fragment(); // can never throw exception
   	    }
   	    catch (RecognitionException re) 
   	    {
   	        Console.Error.WriteLine("impossible: "+re);
   	    }
   	    bool success = !state.failed;
   	    input.Rewind(start);
   	    state.backtracking--;
   	    state.failed = false;
   	    return success;
   	}
   	public bool synpred24_SimSharp() 
   	{
   	    state.backtracking++;
   	    int start = input.Mark();
   	    try 
   	    {
   	        synpred24_SimSharp_fragment(); // can never throw exception
   	    }
   	    catch (RecognitionException re) 
   	    {
   	        Console.Error.WriteLine("impossible: "+re);
   	    }
   	    bool success = !state.failed;
   	    input.Rewind(start);
   	    state.backtracking--;
   	    state.failed = false;
   	    return success;
   	}
   	public bool synpred4_SimSharp() 
   	{
   	    state.backtracking++;
   	    int start = input.Mark();
   	    try 
   	    {
   	        synpred4_SimSharp_fragment(); // can never throw exception
   	    }
   	    catch (RecognitionException re) 
   	    {
   	        Console.Error.WriteLine("impossible: "+re);
   	    }
   	    bool success = !state.failed;
   	    input.Rewind(start);
   	    state.backtracking--;
   	    state.failed = false;
   	    return success;
   	}
   	public bool synpred22_SimSharp() 
   	{
   	    state.backtracking++;
   	    int start = input.Mark();
   	    try 
   	    {
   	        synpred22_SimSharp_fragment(); // can never throw exception
   	    }
   	    catch (RecognitionException re) 
   	    {
   	        Console.Error.WriteLine("impossible: "+re);
   	    }
   	    bool success = !state.failed;
   	    input.Rewind(start);
   	    state.backtracking--;
   	    state.failed = false;
   	    return success;
   	}
   	public bool synpred3_SimSharp() 
   	{
   	    state.backtracking++;
   	    int start = input.Mark();
   	    try 
   	    {
   	        synpred3_SimSharp_fragment(); // can never throw exception
   	    }
   	    catch (RecognitionException re) 
   	    {
   	        Console.Error.WriteLine("impossible: "+re);
   	    }
   	    bool success = !state.failed;
   	    input.Rewind(start);
   	    state.backtracking--;
   	    state.failed = false;
   	    return success;
   	}
   	public bool synpred12_SimSharp() 
   	{
   	    state.backtracking++;
   	    int start = input.Mark();
   	    try 
   	    {
   	        synpred12_SimSharp_fragment(); // can never throw exception
   	    }
   	    catch (RecognitionException re) 
   	    {
   	        Console.Error.WriteLine("impossible: "+re);
   	    }
   	    bool success = !state.failed;
   	    input.Rewind(start);
   	    state.backtracking--;
   	    state.failed = false;
   	    return success;
   	}
   	public bool synpred16_SimSharp() 
   	{
   	    state.backtracking++;
   	    int start = input.Mark();
   	    try 
   	    {
   	        synpred16_SimSharp_fragment(); // can never throw exception
   	    }
   	    catch (RecognitionException re) 
   	    {
   	        Console.Error.WriteLine("impossible: "+re);
   	    }
   	    bool success = !state.failed;
   	    input.Rewind(start);
   	    state.backtracking--;
   	    state.failed = false;
   	    return success;
   	}
   	public bool synpred9_SimSharp() 
   	{
   	    state.backtracking++;
   	    int start = input.Mark();
   	    try 
   	    {
   	        synpred9_SimSharp_fragment(); // can never throw exception
   	    }
   	    catch (RecognitionException re) 
   	    {
   	        Console.Error.WriteLine("impossible: "+re);
   	    }
   	    bool success = !state.failed;
   	    input.Rewind(start);
   	    state.backtracking--;
   	    state.failed = false;
   	    return success;
   	}
   	public bool synpred1_SimSharp() 
   	{
   	    state.backtracking++;
   	    int start = input.Mark();
   	    try 
   	    {
   	        synpred1_SimSharp_fragment(); // can never throw exception
   	    }
   	    catch (RecognitionException re) 
   	    {
   	        Console.Error.WriteLine("impossible: "+re);
   	    }
   	    bool success = !state.failed;
   	    input.Rewind(start);
   	    state.backtracking--;
   	    state.failed = false;
   	    return success;
   	}
   	public bool synpred10_SimSharp() 
   	{
   	    state.backtracking++;
   	    int start = input.Mark();
   	    try 
   	    {
   	        synpred10_SimSharp_fragment(); // can never throw exception
   	    }
   	    catch (RecognitionException re) 
   	    {
   	        Console.Error.WriteLine("impossible: "+re);
   	    }
   	    bool success = !state.failed;
   	    input.Rewind(start);
   	    state.backtracking--;
   	    state.failed = false;
   	    return success;
   	}
   	public bool synpred17_SimSharp() 
   	{
   	    state.backtracking++;
   	    int start = input.Mark();
   	    try 
   	    {
   	        synpred17_SimSharp_fragment(); // can never throw exception
   	    }
   	    catch (RecognitionException re) 
   	    {
   	        Console.Error.WriteLine("impossible: "+re);
   	    }
   	    bool success = !state.failed;
   	    input.Rewind(start);
   	    state.backtracking--;
   	    state.failed = false;
   	    return success;
   	}
   	public bool synpred23_SimSharp() 
   	{
   	    state.backtracking++;
   	    int start = input.Mark();
   	    try 
   	    {
   	        synpred23_SimSharp_fragment(); // can never throw exception
   	    }
   	    catch (RecognitionException re) 
   	    {
   	        Console.Error.WriteLine("impossible: "+re);
   	    }
   	    bool success = !state.failed;
   	    input.Rewind(start);
   	    state.backtracking--;
   	    state.failed = false;
   	    return success;
   	}
   	public bool synpred27_SimSharp() 
   	{
   	    state.backtracking++;
   	    int start = input.Mark();
   	    try 
   	    {
   	        synpred27_SimSharp_fragment(); // can never throw exception
   	    }
   	    catch (RecognitionException re) 
   	    {
   	        Console.Error.WriteLine("impossible: "+re);
   	    }
   	    bool success = !state.failed;
   	    input.Rewind(start);
   	    state.backtracking--;
   	    state.failed = false;
   	    return success;
   	}
   	public bool synpred8_SimSharp() 
   	{
   	    state.backtracking++;
   	    int start = input.Mark();
   	    try 
   	    {
   	        synpred8_SimSharp_fragment(); // can never throw exception
   	    }
   	    catch (RecognitionException re) 
   	    {
   	        Console.Error.WriteLine("impossible: "+re);
   	    }
   	    bool success = !state.failed;
   	    input.Rewind(start);
   	    state.backtracking--;
   	    state.failed = false;
   	    return success;
   	}
   	public bool synpred15_SimSharp() 
   	{
   	    state.backtracking++;
   	    int start = input.Mark();
   	    try 
   	    {
   	        synpred15_SimSharp_fragment(); // can never throw exception
   	    }
   	    catch (RecognitionException re) 
   	    {
   	        Console.Error.WriteLine("impossible: "+re);
   	    }
   	    bool success = !state.failed;
   	    input.Rewind(start);
   	    state.backtracking--;
   	    state.failed = false;
   	    return success;
   	}
   	public bool synpred6_SimSharp() 
   	{
   	    state.backtracking++;
   	    int start = input.Mark();
   	    try 
   	    {
   	        synpred6_SimSharp_fragment(); // can never throw exception
   	    }
   	    catch (RecognitionException re) 
   	    {
   	        Console.Error.WriteLine("impossible: "+re);
   	    }
   	    bool success = !state.failed;
   	    input.Rewind(start);
   	    state.backtracking--;
   	    state.failed = false;
   	    return success;
   	}
   	public bool synpred19_SimSharp() 
   	{
   	    state.backtracking++;
   	    int start = input.Mark();
   	    try 
   	    {
   	        synpred19_SimSharp_fragment(); // can never throw exception
   	    }
   	    catch (RecognitionException re) 
   	    {
   	        Console.Error.WriteLine("impossible: "+re);
   	    }
   	    bool success = !state.failed;
   	    input.Rewind(start);
   	    state.backtracking--;
   	    state.failed = false;
   	    return success;
   	}
   	public bool synpred5_SimSharp() 
   	{
   	    state.backtracking++;
   	    int start = input.Mark();
   	    try 
   	    {
   	        synpred5_SimSharp_fragment(); // can never throw exception
   	    }
   	    catch (RecognitionException re) 
   	    {
   	        Console.Error.WriteLine("impossible: "+re);
   	    }
   	    bool success = !state.failed;
   	    input.Rewind(start);
   	    state.backtracking--;
   	    state.failed = false;
   	    return success;
   	}
   	public bool synpred13_SimSharp() 
   	{
   	    state.backtracking++;
   	    int start = input.Mark();
   	    try 
   	    {
   	        synpred13_SimSharp_fragment(); // can never throw exception
   	    }
   	    catch (RecognitionException re) 
   	    {
   	        Console.Error.WriteLine("impossible: "+re);
   	    }
   	    bool success = !state.failed;
   	    input.Rewind(start);
   	    state.backtracking--;
   	    state.failed = false;
   	    return success;
   	}
   	public bool synpred18_SimSharp() 
   	{
   	    state.backtracking++;
   	    int start = input.Mark();
   	    try 
   	    {
   	        synpred18_SimSharp_fragment(); // can never throw exception
   	    }
   	    catch (RecognitionException re) 
   	    {
   	        Console.Error.WriteLine("impossible: "+re);
   	    }
   	    bool success = !state.failed;
   	    input.Rewind(start);
   	    state.backtracking--;
   	    state.failed = false;
   	    return success;
   	}
   	public bool synpred11_SimSharp() 
   	{
   	    state.backtracking++;
   	    int start = input.Mark();
   	    try 
   	    {
   	        synpred11_SimSharp_fragment(); // can never throw exception
   	    }
   	    catch (RecognitionException re) 
   	    {
   	        Console.Error.WriteLine("impossible: "+re);
   	    }
   	    bool success = !state.failed;
   	    input.Rewind(start);
   	    state.backtracking--;
   	    state.failed = false;
   	    return success;
   	}
   	public bool synpred21_SimSharp() 
   	{
   	    state.backtracking++;
   	    int start = input.Mark();
   	    try 
   	    {
   	        synpred21_SimSharp_fragment(); // can never throw exception
   	    }
   	    catch (RecognitionException re) 
   	    {
   	        Console.Error.WriteLine("impossible: "+re);
   	    }
   	    bool success = !state.failed;
   	    input.Rewind(start);
   	    state.backtracking--;
   	    state.failed = false;
   	    return success;
   	}
   	public bool synpred25_SimSharp() 
   	{
   	    state.backtracking++;
   	    int start = input.Mark();
   	    try 
   	    {
   	        synpred25_SimSharp_fragment(); // can never throw exception
   	    }
   	    catch (RecognitionException re) 
   	    {
   	        Console.Error.WriteLine("impossible: "+re);
   	    }
   	    bool success = !state.failed;
   	    input.Rewind(start);
   	    state.backtracking--;
   	    state.failed = false;
   	    return success;
   	}
   	public bool synpred20_SimSharp() 
   	{
   	    state.backtracking++;
   	    int start = input.Mark();
   	    try 
   	    {
   	        synpred20_SimSharp_fragment(); // can never throw exception
   	    }
   	    catch (RecognitionException re) 
   	    {
   	        Console.Error.WriteLine("impossible: "+re);
   	    }
   	    bool success = !state.failed;
   	    input.Rewind(start);
   	    state.backtracking--;
   	    state.failed = false;
   	    return success;
   	}
   	public bool synpred26_SimSharp() 
   	{
   	    state.backtracking++;
   	    int start = input.Mark();
   	    try 
   	    {
   	        synpred26_SimSharp_fragment(); // can never throw exception
   	    }
   	    catch (RecognitionException re) 
   	    {
   	        Console.Error.WriteLine("impossible: "+re);
   	    }
   	    bool success = !state.failed;
   	    input.Rewind(start);
   	    state.backtracking--;
   	    state.failed = false;
   	    return success;
   	}


   	protected DFA1 dfa1;
   	protected DFA2 dfa2;
   	protected DFA3 dfa3;
   	protected DFA7 dfa7;
   	protected DFA13 dfa13;
   	protected DFA14 dfa14;
   	protected DFA15 dfa15;
   	protected DFA16 dfa16;
   	protected DFA17 dfa17;
   	protected DFA35 dfa35;
   	protected DFA64 dfa64;
   	protected DFA70 dfa70;
   	protected DFA72 dfa72;
   	protected DFA73 dfa73;
   	protected DFA76 dfa76;
   	protected DFA77 dfa77;
   	protected DFA78 dfa78;
   	protected DFA85 dfa85;
   	protected DFA88 dfa88;
   	protected DFA95 dfa95;
	private void InitializeCyclicDFAs()
	{
    	this.dfa1 = new DFA1(this);
    	this.dfa2 = new DFA2(this);
    	this.dfa3 = new DFA3(this);
    	this.dfa7 = new DFA7(this);
    	this.dfa13 = new DFA13(this);
    	this.dfa14 = new DFA14(this);
    	this.dfa15 = new DFA15(this);
    	this.dfa16 = new DFA16(this);
    	this.dfa17 = new DFA17(this);
    	this.dfa35 = new DFA35(this);
    	this.dfa64 = new DFA64(this);
    	this.dfa70 = new DFA70(this);
    	this.dfa72 = new DFA72(this);
    	this.dfa73 = new DFA73(this);
    	this.dfa76 = new DFA76(this);
    	this.dfa77 = new DFA77(this);
    	this.dfa78 = new DFA78(this);
    	this.dfa85 = new DFA85(this);
    	this.dfa88 = new DFA88(this);
    	this.dfa95 = new DFA95(this);

	    this.dfa2.specialStateTransitionHandler = new DFA.SpecialStateTransitionHandler(DFA2_SpecialStateTransition);


	    this.dfa13.specialStateTransitionHandler = new DFA.SpecialStateTransitionHandler(DFA13_SpecialStateTransition);

	    this.dfa15.specialStateTransitionHandler = new DFA.SpecialStateTransitionHandler(DFA15_SpecialStateTransition);
	    this.dfa16.specialStateTransitionHandler = new DFA.SpecialStateTransitionHandler(DFA16_SpecialStateTransition);


	    this.dfa64.specialStateTransitionHandler = new DFA.SpecialStateTransitionHandler(DFA64_SpecialStateTransition);
	    this.dfa70.specialStateTransitionHandler = new DFA.SpecialStateTransitionHandler(DFA70_SpecialStateTransition);
	    this.dfa72.specialStateTransitionHandler = new DFA.SpecialStateTransitionHandler(DFA72_SpecialStateTransition);
	    this.dfa73.specialStateTransitionHandler = new DFA.SpecialStateTransitionHandler(DFA73_SpecialStateTransition);
	    this.dfa76.specialStateTransitionHandler = new DFA.SpecialStateTransitionHandler(DFA76_SpecialStateTransition);
	    this.dfa77.specialStateTransitionHandler = new DFA.SpecialStateTransitionHandler(DFA77_SpecialStateTransition);
	    this.dfa78.specialStateTransitionHandler = new DFA.SpecialStateTransitionHandler(DFA78_SpecialStateTransition);
	    this.dfa85.specialStateTransitionHandler = new DFA.SpecialStateTransitionHandler(DFA85_SpecialStateTransition);
	    this.dfa88.specialStateTransitionHandler = new DFA.SpecialStateTransitionHandler(DFA88_SpecialStateTransition);
	    this.dfa95.specialStateTransitionHandler = new DFA.SpecialStateTransitionHandler(DFA95_SpecialStateTransition);
	}

    const string DFA1_eotS =
        "\x0e\uffff";
    const string DFA1_eofS =
        "\x0e\uffff";
    const string DFA1_minS =
        "\x01\x47\x0d\uffff";
    const string DFA1_maxS =
        "\x01\u0088\x0d\uffff";
    const string DFA1_acceptS =
        "\x01\uffff\x01\x01\x01\x02\x0b\uffff";
    const string DFA1_specialS =
        "\x0e\uffff}>";
    static readonly string[] DFA1_transitionS = {
            "\x01\x01\x02\x02\x01\uffff\x01\x02\x17\uffff\x01\x02\x1d\uffff"+
            "\x08\x02",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            ""
    };

    static readonly short[] DFA1_eot = DFA.UnpackEncodedString(DFA1_eotS);
    static readonly short[] DFA1_eof = DFA.UnpackEncodedString(DFA1_eofS);
    static readonly char[] DFA1_min = DFA.UnpackEncodedStringToUnsignedChars(DFA1_minS);
    static readonly char[] DFA1_max = DFA.UnpackEncodedStringToUnsignedChars(DFA1_maxS);
    static readonly short[] DFA1_accept = DFA.UnpackEncodedString(DFA1_acceptS);
    static readonly short[] DFA1_special = DFA.UnpackEncodedString(DFA1_specialS);
    static readonly short[][] DFA1_transition = DFA.UnpackEncodedStringArray(DFA1_transitionS);

    protected class DFA1 : DFA
    {
        public DFA1(BaseRecognizer recognizer)
        {
            this.recognizer = recognizer;
            this.decisionNumber = 1;
            this.eot = DFA1_eot;
            this.eof = DFA1_eof;
            this.min = DFA1_min;
            this.max = DFA1_max;
            this.accept = DFA1_accept;
            this.special = DFA1_special;
            this.transition = DFA1_transition;

        }

        override public string Description
        {
            get { return "136:3: ( externalHead )?"; }
        }

    }

    const string DFA2_eotS =
        "\x0d\uffff";
    const string DFA2_eofS =
        "\x0d\uffff";
    const string DFA2_minS =
        "\x01\x48\x0c\uffff";
    const string DFA2_maxS =
        "\x01\u0088\x0c\uffff";
    const string DFA2_acceptS =
        "\x01\uffff\x01\x01\x01\x02\x08\uffff\x02\x03";
    const string DFA2_specialS =
        "\x01\x00\x0c\uffff}>";
    static readonly string[] DFA2_transitionS = {
            "\x01\x02\x01\x0b\x01\uffff\x01\x0c\x17\uffff\x01\x01\x1d\uffff"+
            "\x08\x02",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            ""
    };

    static readonly short[] DFA2_eot = DFA.UnpackEncodedString(DFA2_eotS);
    static readonly short[] DFA2_eof = DFA.UnpackEncodedString(DFA2_eofS);
    static readonly char[] DFA2_min = DFA.UnpackEncodedStringToUnsignedChars(DFA2_minS);
    static readonly char[] DFA2_max = DFA.UnpackEncodedStringToUnsignedChars(DFA2_maxS);
    static readonly short[] DFA2_accept = DFA.UnpackEncodedString(DFA2_acceptS);
    static readonly short[] DFA2_special = DFA.UnpackEncodedString(DFA2_specialS);
    static readonly short[][] DFA2_transition = DFA.UnpackEncodedStringArray(DFA2_transitionS);

    protected class DFA2 : DFA
    {
        public DFA2(BaseRecognizer recognizer)
        {
            this.recognizer = recognizer;
            this.decisionNumber = 2;
            this.eot = DFA2_eot;
            this.eof = DFA2_eof;
            this.min = DFA2_min;
            this.max = DFA2_max;
            this.accept = DFA2_accept;
            this.special = DFA2_special;
            this.transition = DFA2_transition;

        }

        override public string Description
        {
            get { return "137:4: ( program | procedureDeclaration | ( ( ID )? CLASS )=> classDeclaration )"; }
        }

    }


    protected internal int DFA2_SpecialStateTransition(DFA dfa, int s, IIntStream _input) //throws NoViableAltException
    {
            ITokenStream input = (ITokenStream)_input;
    	int _s = s;
        switch ( s )
        {
               	case 0 : 
                   	int LA2_0 = input.LA(1);

                   	 
                   	int index2_0 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (LA2_0 == BEGIN) ) { s = 1; }

                   	else if ( (LA2_0 == PROCEDURE || (LA2_0 >= BOOLEAN && LA2_0 <= REF)) ) { s = 2; }

                   	else if ( (LA2_0 == ID) && (synpred1_SimSharp()) ) { s = 11; }

                   	else if ( (LA2_0 == CLASS) && (synpred1_SimSharp()) ) { s = 12; }

                   	 
                   	input.Seek(index2_0);
                   	if ( s >= 0 ) return s;
                   	break;
        }
        if (state.backtracking > 0) {state.failed = true; return -1;}
        NoViableAltException nvae2 =
            new NoViableAltException(dfa.Description, 2, _s, input);
        dfa.Error(nvae2);
        throw nvae2;
    }
    const string DFA3_eotS =
        "\x0e\uffff";
    const string DFA3_eofS =
        "\x0e\uffff";
    const string DFA3_minS =
        "\x01\x47\x0d\uffff";
    const string DFA3_maxS =
        "\x01\u0088\x0d\uffff";
    const string DFA3_acceptS =
        "\x01\uffff\x01\x02\x0b\uffff\x01\x01";
    const string DFA3_specialS =
        "\x0e\uffff}>";
    static readonly string[] DFA3_transitionS = {
            "\x01\x0d\x02\x01\x01\uffff\x01\x01\x17\uffff\x01\x01\x1d\uffff"+
            "\x08\x01",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            ""
    };

    static readonly short[] DFA3_eot = DFA.UnpackEncodedString(DFA3_eotS);
    static readonly short[] DFA3_eof = DFA.UnpackEncodedString(DFA3_eofS);
    static readonly char[] DFA3_min = DFA.UnpackEncodedStringToUnsignedChars(DFA3_minS);
    static readonly char[] DFA3_max = DFA.UnpackEncodedStringToUnsignedChars(DFA3_maxS);
    static readonly short[] DFA3_accept = DFA.UnpackEncodedString(DFA3_acceptS);
    static readonly short[] DFA3_special = DFA.UnpackEncodedString(DFA3_specialS);
    static readonly short[][] DFA3_transition = DFA.UnpackEncodedStringArray(DFA3_transitionS);

    protected class DFA3 : DFA
    {
        public DFA3(BaseRecognizer recognizer)
        {
            this.recognizer = recognizer;
            this.decisionNumber = 3;
            this.eot = DFA3_eot;
            this.eof = DFA3_eof;
            this.min = DFA3_min;
            this.max = DFA3_max;
            this.accept = DFA3_accept;
            this.special = DFA3_special;
            this.transition = DFA3_transition;

        }

        override public string Description
        {
            get { return "()* loopback of 141:31: ( externalDeclaration SCOLON )*"; }
        }

    }

    const string DFA7_eotS =
        "\x22\uffff";
    const string DFA7_eofS =
        "\x15\uffff\x01\x03\x06\uffff\x01\x03\x05\uffff";
    const string DFA7_minS =
        "\x01\x47\x02\x48\x11\uffff\x01\x49\x01\x3f\x01\x4d\x05\uffff\x01"+
        "\x3f\x05\uffff";
    const string DFA7_maxS =
        "\x01\x47\x02\u0088\x11\uffff\x01\x49\x01\x64\x01\x4d\x05\uffff"+
        "\x01\x64\x05\uffff";
    const string DFA7_acceptS =
        "\x03\uffff\x01\x01\x17\uffff\x01\x02\x06\uffff";
    const string DFA7_specialS =
        "\x22\uffff}>";
    static readonly string[] DFA7_transitionS = {
            "\x01\x01",
            "\x01\x03\x01\x02\x37\uffff\x08\x03",
            "\x01\x14\x38\uffff\x08\x03",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "\x01\x15",
            "\x01\x03\x04\uffff\x01\x03\x05\uffff\x01\x1b\x01\uffff\x01"+
            "\x16\x17\uffff\x01\x03",
            "\x01\x1c",
            "",
            "",
            "",
            "",
            "",
            "\x01\x03\x04\uffff\x01\x03\x05\uffff\x01\x1b\x19\uffff\x01"+
            "\x03",
            "",
            "",
            "",
            "",
            ""
    };

    static readonly short[] DFA7_eot = DFA.UnpackEncodedString(DFA7_eotS);
    static readonly short[] DFA7_eof = DFA.UnpackEncodedString(DFA7_eofS);
    static readonly char[] DFA7_min = DFA.UnpackEncodedStringToUnsignedChars(DFA7_minS);
    static readonly char[] DFA7_max = DFA.UnpackEncodedStringToUnsignedChars(DFA7_maxS);
    static readonly short[] DFA7_accept = DFA.UnpackEncodedString(DFA7_acceptS);
    static readonly short[] DFA7_special = DFA.UnpackEncodedString(DFA7_specialS);
    static readonly short[][] DFA7_transition = DFA.UnpackEncodedStringArray(DFA7_transitionS);

    protected class DFA7 : DFA
    {
        public DFA7(BaseRecognizer recognizer)
        {
            this.recognizer = recognizer;
            this.decisionNumber = 7;
            this.eot = DFA7_eot;
            this.eof = DFA7_eof;
            this.min = DFA7_min;
            this.max = DFA7_max;
            this.accept = DFA7_accept;
            this.special = DFA7_special;
            this.transition = DFA7_transition;

        }

        override public string Description
        {
            get { return "163:1: externalProcedureDeclaration options {k=7; } : ( EXTERNAL ( kind )? ( type )? PROCEDURE externalList | EXTERNAL kind PROCEDURE externalItem procedureSpecification );"; }
        }

    }

    const string DFA13_eotS =
        "\x17\uffff";
    const string DFA13_eofS =
        "\x01\x02\x16\uffff";
    const string DFA13_minS =
        "\x01\x3f\x01\x00\x15\uffff";
    const string DFA13_maxS =
        "\x01\u008a\x01\x00\x15\uffff";
    const string DFA13_acceptS =
        "\x02\uffff\x01\x02\x13\uffff\x01\x01";
    const string DFA13_specialS =
        "\x01\uffff\x01\x00\x15\uffff}>";
    static readonly string[] DFA13_transitionS = {
            "\x01\x02\x01\uffff\x01\x02\x07\uffff\x01\x01\x03\uffff\x03"+
            "\x02\x05\uffff\x02\x02\x01\uffff\x01\x02\x01\uffff\x01\x02\x02"+
            "\uffff\x02\x02\x01\uffff\x05\x02\x15\uffff\x07\x02\x08\uffff"+
            "\x02\x02",
            "\x01\uffff",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            ""
    };

    static readonly short[] DFA13_eot = DFA.UnpackEncodedString(DFA13_eotS);
    static readonly short[] DFA13_eof = DFA.UnpackEncodedString(DFA13_eofS);
    static readonly char[] DFA13_min = DFA.UnpackEncodedStringToUnsignedChars(DFA13_minS);
    static readonly char[] DFA13_max = DFA.UnpackEncodedStringToUnsignedChars(DFA13_maxS);
    static readonly short[] DFA13_accept = DFA.UnpackEncodedString(DFA13_acceptS);
    static readonly short[] DFA13_special = DFA.UnpackEncodedString(DFA13_specialS);
    static readonly short[][] DFA13_transition = DFA.UnpackEncodedStringArray(DFA13_transitionS);

    protected class DFA13 : DFA
    {
        public DFA13(BaseRecognizer recognizer)
        {
            this.recognizer = recognizer;
            this.decisionNumber = 13;
            this.eot = DFA13_eot;
            this.eof = DFA13_eof;
            this.min = DFA13_min;
            this.max = DFA13_max;
            this.accept = DFA13_accept;
            this.special = DFA13_special;
            this.transition = DFA13_transition;

        }

        override public string Description
        {
            get { return "233:4: ( ( label COLON )=> label COLON )?"; }
        }

    }


    protected internal int DFA13_SpecialStateTransition(DFA dfa, int s, IIntStream _input) //throws NoViableAltException
    {
            ITokenStream input = (ITokenStream)_input;
    	int _s = s;
        switch ( s )
        {
               	case 0 : 
                   	int LA13_1 = input.LA(1);

                   	 
                   	int index13_1 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred3_SimSharp()) ) { s = 22; }

                   	else if ( (true) ) { s = 2; }

                   	 
                   	input.Seek(index13_1);
                   	if ( s >= 0 ) return s;
                   	break;
        }
        if (state.backtracking > 0) {state.failed = true; return -1;}
        NoViableAltException nvae13 =
            new NoViableAltException(dfa.Description, 13, _s, input);
        dfa.Error(nvae13);
        throw nvae13;
    }
    const string DFA14_eotS =
        "\x16\uffff";
    const string DFA14_eofS =
        "\x01\x01\x15\uffff";
    const string DFA14_minS =
        "\x01\x3f\x15\uffff";
    const string DFA14_maxS =
        "\x01\u008a\x15\uffff";
    const string DFA14_acceptS =
        "\x01\uffff\x01\x01\x12\uffff\x01\x02\x01\x03";
    const string DFA14_specialS =
        "\x16\uffff}>";
    static readonly string[] DFA14_transitionS = {
            "\x01\x01\x01\uffff\x01\x01\x07\uffff\x01\x01\x03\uffff\x03"+
            "\x01\x05\uffff\x01\x01\x01\x14\x01\uffff\x01\x01\x01\uffff\x01"+
            "\x15\x02\uffff\x02\x01\x01\uffff\x05\x01\x15\uffff\x07\x01\x08"+
            "\uffff\x02\x01",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            ""
    };

    static readonly short[] DFA14_eot = DFA.UnpackEncodedString(DFA14_eotS);
    static readonly short[] DFA14_eof = DFA.UnpackEncodedString(DFA14_eofS);
    static readonly char[] DFA14_min = DFA.UnpackEncodedStringToUnsignedChars(DFA14_minS);
    static readonly char[] DFA14_max = DFA.UnpackEncodedStringToUnsignedChars(DFA14_maxS);
    static readonly short[] DFA14_accept = DFA.UnpackEncodedString(DFA14_acceptS);
    static readonly short[] DFA14_special = DFA.UnpackEncodedString(DFA14_specialS);
    static readonly short[][] DFA14_transition = DFA.UnpackEncodedStringArray(DFA14_transitionS);

    protected class DFA14 : DFA
    {
        public DFA14(BaseRecognizer recognizer)
        {
            this.recognizer = recognizer;
            this.decisionNumber = 14;
            this.eot = DFA14_eot;
            this.eof = DFA14_eof;
            this.min = DFA14_min;
            this.max = DFA14_max;
            this.accept = DFA14_accept;
            this.special = DFA14_special;
            this.transition = DFA14_transition;

        }

        override public string Description
        {
            get { return "234:3: ( unconditionalStatement | conditionalStatement | forStatement )"; }
        }

    }

    const string DFA15_eotS =
        "\x18\uffff";
    const string DFA15_eofS =
        "\x01\x0e\x17\uffff";
    const string DFA15_minS =
        "\x01\x3f\x07\x00\x10\uffff";
    const string DFA15_maxS =
        "\x01\u008a\x07\x00\x10\uffff";
    const string DFA15_acceptS =
        "\x08\uffff\x01\x05\x01\x06\x01\uffff\x01\x07\x01\x08\x01\x09\x01"+
        "\x0a\x05\uffff\x01\x01\x01\x03\x01\x04\x01\x02";
    const string DFA15_specialS =
        "\x01\x00\x01\x01\x01\x02\x01\x03\x01\x04\x01\x05\x01\x06\x01\x07"+
        "\x10\uffff}>";
    static readonly string[] DFA15_transitionS = {
            "\x01\x0e\x01\uffff\x01\x07\x07\uffff\x01\x01\x03\uffff\x01"+
            "\x04\x02\x0d\x05\uffff\x01\x0e\x02\uffff\x01\x08\x04\uffff\x02"+
            "\x09\x01\uffff\x01\x0b\x02\x0e\x01\x0c\x01\x0e\x15\uffff\x01"+
            "\x03\x04\x04\x01\x02\x01\x05\x08\uffff\x02\x06",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            ""
    };

    static readonly short[] DFA15_eot = DFA.UnpackEncodedString(DFA15_eotS);
    static readonly short[] DFA15_eof = DFA.UnpackEncodedString(DFA15_eofS);
    static readonly char[] DFA15_min = DFA.UnpackEncodedStringToUnsignedChars(DFA15_minS);
    static readonly char[] DFA15_max = DFA.UnpackEncodedStringToUnsignedChars(DFA15_maxS);
    static readonly short[] DFA15_accept = DFA.UnpackEncodedString(DFA15_acceptS);
    static readonly short[] DFA15_special = DFA.UnpackEncodedString(DFA15_specialS);
    static readonly short[][] DFA15_transition = DFA.UnpackEncodedStringArray(DFA15_transitionS);

    protected class DFA15 : DFA
    {
        public DFA15(BaseRecognizer recognizer)
        {
            this.recognizer = recognizer;
            this.decisionNumber = 15;
            this.eot = DFA15_eot;
            this.eof = DFA15_eof;
            this.min = DFA15_min;
            this.max = DFA15_max;
            this.accept = DFA15_accept;
            this.special = DFA15_special;
            this.transition = DFA15_transition;

        }

        override public string Description
        {
            get { return "237:1: unconditionalStatement : ( ( prefixedBlock )=> prefixedBlock | ( objectGenerator ( SCOLON | END ) )=> objectGenerator | ( assignmentStatement )=> assignmentStatement | procedureStatement | whileStatement | gotoStatement | connectionStatement | block | activationStatement | dummyStatement );"; }
        }

    }


    protected internal int DFA15_SpecialStateTransition(DFA dfa, int s, IIntStream _input) //throws NoViableAltException
    {
            ITokenStream input = (ITokenStream)_input;
    	int _s = s;
        switch ( s )
        {
               	case 0 : 
                   	int LA15_0 = input.LA(1);

                   	 
                   	int index15_0 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (LA15_0 == ID) && (((assignment==false)|| (assignment==true))) ) { s = 1; }

                   	else if ( (LA15_0 == NEW) && (((assignment==false)|| (assignment==true))) ) { s = 2; }

                   	else if ( (LA15_0 == NONE) && (((assignment==false)|| (assignment==true))) ) { s = 3; }

                   	else if ( (LA15_0 == STRING || (LA15_0 >= NUM_INT && LA15_0 <= CHARCONST)) && (((assignment==false)|| (assignment==true))) ) { s = 4; }

                   	else if ( (LA15_0 == THIS) && (((assignment==false)|| (assignment==true))) ) { s = 5; }

                   	else if ( ((LA15_0 >= TRUE && LA15_0 <= FALSE)) && (((assignment==false)|| (assignment==true))) ) { s = 6; }

                   	else if ( (LA15_0 == LPAR) && (((assignment==false)|| (assignment==true))) ) { s = 7; }

                   	else if ( (LA15_0 == WHILE) ) { s = 8; }

                   	else if ( ((LA15_0 >= GOTO && LA15_0 <= GO)) ) { s = 9; }

                   	else if ( (LA15_0 == INSPECT) ) { s = 11; }

                   	else if ( (LA15_0 == BEGIN) ) { s = 12; }

                   	else if ( ((LA15_0 >= ACTIVATE && LA15_0 <= REACTIVATE)) ) { s = 13; }

                   	else if ( (LA15_0 == EOF || LA15_0 == SCOLON || LA15_0 == ELSE || (LA15_0 >= WHEN && LA15_0 <= OTHERWISE) || LA15_0 == END) ) { s = 14; }

                   	 
                   	input.Seek(index15_0);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 1 : 
                   	int LA15_1 = input.LA(1);

                   	 
                   	int index15_1 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred4_SimSharp()) ) { s = 20; }

                   	else if ( (synpred6_SimSharp()) ) { s = 21; }

                   	else if ( (((assignment==false)|| (assignment==true))) ) { s = 22; }

                   	 
                   	input.Seek(index15_1);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 2 : 
                   	int LA15_2 = input.LA(1);

                   	 
                   	int index15_2 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred5_SimSharp()) ) { s = 23; }

                   	else if ( (synpred6_SimSharp()) ) { s = 21; }

                   	else if ( (((assignment==false)|| (assignment==true))) ) { s = 22; }

                   	 
                   	input.Seek(index15_2);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 3 : 
                   	int LA15_3 = input.LA(1);

                   	 
                   	int index15_3 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred6_SimSharp()) ) { s = 21; }

                   	else if ( (((assignment==false)|| (assignment==true))) ) { s = 22; }

                   	 
                   	input.Seek(index15_3);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 4 : 
                   	int LA15_4 = input.LA(1);

                   	 
                   	int index15_4 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred6_SimSharp()) ) { s = 21; }

                   	else if ( (((assignment==false)|| (assignment==true))) ) { s = 22; }

                   	 
                   	input.Seek(index15_4);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 5 : 
                   	int LA15_5 = input.LA(1);

                   	 
                   	int index15_5 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred6_SimSharp()) ) { s = 21; }

                   	else if ( (((assignment==false)|| (assignment==true))) ) { s = 22; }

                   	 
                   	input.Seek(index15_5);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 6 : 
                   	int LA15_6 = input.LA(1);

                   	 
                   	int index15_6 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred6_SimSharp()) ) { s = 21; }

                   	else if ( (((assignment==false)|| (assignment==true))) ) { s = 22; }

                   	 
                   	input.Seek(index15_6);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 7 : 
                   	int LA15_7 = input.LA(1);

                   	 
                   	int index15_7 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred6_SimSharp()) ) { s = 21; }

                   	else if ( (((assignment==false)|| (assignment==true))) ) { s = 22; }

                   	 
                   	input.Seek(index15_7);
                   	if ( s >= 0 ) return s;
                   	break;
        }
        if (state.backtracking > 0) {state.failed = true; return -1;}
        NoViableAltException nvae15 =
            new NoViableAltException(dfa.Description, 15, _s, input);
        dfa.Error(nvae15);
        throw nvae15;
    }
    const string DFA16_eotS =
        "\x0d\uffff";
    const string DFA16_eofS =
        "\x0d\uffff";
    const string DFA16_minS =
        "\x01\x35\x07\x00\x05\uffff";
    const string DFA16_maxS =
        "\x01\u008a\x07\x00\x05\uffff";
    const string DFA16_acceptS =
        "\x08\uffff\x01\x02\x03\uffff\x01\x01";
    const string DFA16_specialS =
        "\x01\x00\x01\x01\x01\x02\x01\x03\x01\x04\x01\x05\x01\x06\x01\x07"+
        "\x05\uffff}>";
    static readonly string[] DFA16_transitionS = {
            "\x02\x08\x0a\uffff\x01\x07\x07\uffff\x01\x06\x03\uffff\x01"+
            "\x02\x08\uffff\x01\x08\x1b\uffff\x01\x08\x07\uffff\x01\x01\x04"+
            "\x02\x01\x03\x01\x04\x08\uffff\x02\x05",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "",
            "",
            "",
            "",
            ""
    };

    static readonly short[] DFA16_eot = DFA.UnpackEncodedString(DFA16_eotS);
    static readonly short[] DFA16_eof = DFA.UnpackEncodedString(DFA16_eofS);
    static readonly char[] DFA16_min = DFA.UnpackEncodedStringToUnsignedChars(DFA16_minS);
    static readonly char[] DFA16_max = DFA.UnpackEncodedStringToUnsignedChars(DFA16_maxS);
    static readonly short[] DFA16_accept = DFA.UnpackEncodedString(DFA16_acceptS);
    static readonly short[] DFA16_special = DFA.UnpackEncodedString(DFA16_specialS);
    static readonly short[][] DFA16_transition = DFA.UnpackEncodedStringArray(DFA16_transitionS);

    protected class DFA16 : DFA
    {
        public DFA16(BaseRecognizer recognizer)
        {
            this.recognizer = recognizer;
            this.decisionNumber = 16;
            this.eot = DFA16_eot;
            this.eof = DFA16_eof;
            this.min = DFA16_min;
            this.max = DFA16_max;
            this.accept = DFA16_accept;
            this.special = DFA16_special;
            this.transition = DFA16_transition;

        }

        override public string Description
        {
            get { return "263:3: ( ( ( assignmentStatement )=> assignmentStatement -> ^( assignmentOp destination assignmentStatement ) ) | expression -> ^( assignmentOp destination expression ) )"; }
        }

    }


    protected internal int DFA16_SpecialStateTransition(DFA dfa, int s, IIntStream _input) //throws NoViableAltException
    {
            ITokenStream input = (ITokenStream)_input;
    	int _s = s;
        switch ( s )
        {
               	case 0 : 
                   	int LA16_0 = input.LA(1);

                   	 
                   	int index16_0 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (LA16_0 == NONE) && (((assignment==false)|| (assignment==true))) ) { s = 1; }

                   	else if ( (LA16_0 == STRING || (LA16_0 >= NUM_INT && LA16_0 <= CHARCONST)) && (((assignment==false)|| (assignment==true))) ) { s = 2; }

                   	else if ( (LA16_0 == NEW) && (((assignment==false)|| (assignment==true))) ) { s = 3; }

                   	else if ( (LA16_0 == THIS) && (((assignment==false)|| (assignment==true))) ) { s = 4; }

                   	else if ( ((LA16_0 >= TRUE && LA16_0 <= FALSE)) && (((assignment==false)|| (assignment==true))) ) { s = 5; }

                   	else if ( (LA16_0 == ID) && (((assignment==false)|| (assignment==true))) ) { s = 6; }

                   	else if ( (LA16_0 == LPAR) && (((assignment==false)|| (assignment==true))) ) { s = 7; }

                   	else if ( ((LA16_0 >= PLUS && LA16_0 <= MINUS) || LA16_0 == IF || LA16_0 == NOT) ) { s = 8; }

                   	 
                   	input.Seek(index16_0);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 1 : 
                   	int LA16_1 = input.LA(1);

                   	 
                   	int index16_1 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred8_SimSharp()) ) { s = 12; }

                   	else if ( (((assignment==false)|| (assignment==true))) ) { s = 8; }

                   	 
                   	input.Seek(index16_1);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 2 : 
                   	int LA16_2 = input.LA(1);

                   	 
                   	int index16_2 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred8_SimSharp()) ) { s = 12; }

                   	else if ( (((assignment==false)|| (assignment==true))) ) { s = 8; }

                   	 
                   	input.Seek(index16_2);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 3 : 
                   	int LA16_3 = input.LA(1);

                   	 
                   	int index16_3 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred8_SimSharp()) ) { s = 12; }

                   	else if ( (((assignment==false)|| (assignment==true))) ) { s = 8; }

                   	 
                   	input.Seek(index16_3);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 4 : 
                   	int LA16_4 = input.LA(1);

                   	 
                   	int index16_4 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred8_SimSharp()) ) { s = 12; }

                   	else if ( (((assignment==false)|| (assignment==true))) ) { s = 8; }

                   	 
                   	input.Seek(index16_4);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 5 : 
                   	int LA16_5 = input.LA(1);

                   	 
                   	int index16_5 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred8_SimSharp()) ) { s = 12; }

                   	else if ( (((assignment==false)|| (assignment==true))) ) { s = 8; }

                   	 
                   	input.Seek(index16_5);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 6 : 
                   	int LA16_6 = input.LA(1);

                   	 
                   	int index16_6 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred8_SimSharp()) ) { s = 12; }

                   	else if ( (((assignment==false)|| (assignment==true))) ) { s = 8; }

                   	 
                   	input.Seek(index16_6);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 7 : 
                   	int LA16_7 = input.LA(1);

                   	 
                   	int index16_7 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred8_SimSharp()) ) { s = 12; }

                   	else if ( (((assignment==false)|| (assignment==true))) ) { s = 8; }

                   	 
                   	input.Seek(index16_7);
                   	if ( s >= 0 ) return s;
                   	break;
        }
        if (state.backtracking > 0) {state.failed = true; return -1;}
        NoViableAltException nvae16 =
            new NoViableAltException(dfa.Description, 16, _s, input);
        dfa.Error(nvae16);
        throw nvae16;
    }
    const string DFA17_eotS =
        "\x15\uffff";
    const string DFA17_eofS =
        "\x01\x01\x14\uffff";
    const string DFA17_minS =
        "\x01\x3f\x14\uffff";
    const string DFA17_maxS =
        "\x01\u008a\x14\uffff";
    const string DFA17_acceptS =
        "\x01\uffff\x01\x01\x12\uffff\x01\x02";
    const string DFA17_specialS =
        "\x15\uffff}>";
    static readonly string[] DFA17_transitionS = {
            "\x01\x01\x01\uffff\x01\x01\x07\uffff\x01\x01\x03\uffff\x03"+
            "\x01\x05\uffff\x01\x01\x02\uffff\x01\x01\x01\uffff\x01\x14\x02"+
            "\uffff\x02\x01\x01\uffff\x05\x01\x15\uffff\x07\x01\x08\uffff"+
            "\x02\x01",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            ""
    };

    static readonly short[] DFA17_eot = DFA.UnpackEncodedString(DFA17_eotS);
    static readonly short[] DFA17_eof = DFA.UnpackEncodedString(DFA17_eofS);
    static readonly char[] DFA17_min = DFA.UnpackEncodedStringToUnsignedChars(DFA17_minS);
    static readonly char[] DFA17_max = DFA.UnpackEncodedStringToUnsignedChars(DFA17_maxS);
    static readonly short[] DFA17_accept = DFA.UnpackEncodedString(DFA17_acceptS);
    static readonly short[] DFA17_special = DFA.UnpackEncodedString(DFA17_specialS);
    static readonly short[][] DFA17_transition = DFA.UnpackEncodedStringArray(DFA17_transitionS);

    protected class DFA17 : DFA
    {
        public DFA17(BaseRecognizer recognizer)
        {
            this.recognizer = recognizer;
            this.decisionNumber = 17;
            this.eot = DFA17_eot;
            this.eof = DFA17_eof;
            this.min = DFA17_min;
            this.max = DFA17_max;
            this.accept = DFA17_accept;
            this.special = DFA17_special;
            this.transition = DFA17_transition;

        }

        override public string Description
        {
            get { return "280:14: ( unconditionalStatement | forStatement )"; }
        }

    }

    const string DFA35_eotS =
        "\x2c\uffff";
    const string DFA35_eofS =
        "\x2c\uffff";
    const string DFA35_minS =
        "\x01\x47\x01\x48\x01\u0083\x01\x48\x01\u0085\x02\x48\x01\x41\x01"+
        "\x48\x09\uffff\x01\x48\x03\uffff\x01\x48\x06\uffff\x01\x49\x09\uffff"+
        "\x01\x42\x01\x48\x03\uffff";
    const string DFA35_maxS =
        "\x01\u0088\x01\x65\x01\u0083\x01\x65\x01\u0085\x02\x65\x01\x41"+
        "\x01\x65\x09\uffff\x01\x65\x03\uffff\x01\x65\x06\uffff\x01\x49\x09"+
        "\uffff\x01\x42\x01\x65\x03\uffff";
    const string DFA35_acceptS =
        "\x09\uffff\x01\x02\x01\x03\x01\x04\x01\x05\x01\uffff\x01\x06\x01"+
        "\uffff\x01\x01\x1b\uffff";
    const string DFA35_specialS =
        "\x2c\uffff}>";
    static readonly string[] DFA35_transitionS = {
            "\x01\x0e\x01\x0b\x01\x0c\x01\uffff\x01\x0c\x19\uffff\x01\x09"+
            "\x01\x0a\x1a\uffff\x01\x05\x01\x06\x01\x01\x01\x02\x01\x03\x01"+
            "\x04\x01\x08\x01\x07",
            "\x01\x0b\x01\x10\x1b\uffff\x01\x09",
            "\x01\x12",
            "\x01\x0b\x01\x10\x1b\uffff\x01\x09",
            "\x01\x16",
            "\x01\x0b\x01\x10\x1b\uffff\x01\x09",
            "\x01\x0b\x01\x10\x1b\uffff\x01\x09",
            "\x01\x1d",
            "\x01\x0b\x01\x10\x1b\uffff\x01\x09",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "\x01\x0b\x01\x10\x1b\uffff\x01\x09",
            "",
            "",
            "",
            "\x01\x0b\x01\x10\x1b\uffff\x01\x09",
            "",
            "",
            "",
            "",
            "",
            "",
            "\x01\x27",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "\x01\x28",
            "\x01\x0b\x01\x10\x1b\uffff\x01\x09",
            "",
            "",
            ""
    };

    static readonly short[] DFA35_eot = DFA.UnpackEncodedString(DFA35_eotS);
    static readonly short[] DFA35_eof = DFA.UnpackEncodedString(DFA35_eofS);
    static readonly char[] DFA35_min = DFA.UnpackEncodedStringToUnsignedChars(DFA35_minS);
    static readonly char[] DFA35_max = DFA.UnpackEncodedStringToUnsignedChars(DFA35_maxS);
    static readonly short[] DFA35_accept = DFA.UnpackEncodedString(DFA35_acceptS);
    static readonly short[] DFA35_special = DFA.UnpackEncodedString(DFA35_specialS);
    static readonly short[][] DFA35_transition = DFA.UnpackEncodedStringArray(DFA35_transitionS);

    protected class DFA35 : DFA
    {
        public DFA35(BaseRecognizer recognizer)
        {
            this.recognizer = recognizer;
            this.decisionNumber = 35;
            this.eot = DFA35_eot;
            this.eof = DFA35_eof;
            this.min = DFA35_min;
            this.max = DFA35_max;
            this.accept = DFA35_accept;
            this.special = DFA35_special;
            this.transition = DFA35_transition;

        }

        override public string Description
        {
            get { return "394:1: declaration options {k=5; } : ( simpleVarDeclaration | arrayDeclaration | switchDeclaration | procedureDeclaration | classDeclaration | externalDeclaration );"; }
        }

    }

    const string DFA64_eotS =
        "\x1f\uffff";
    const string DFA64_eofS =
        "\x1f\uffff";
    const string DFA64_minS =
        "\x01\x3f\x01\x00\x1d\uffff";
    const string DFA64_maxS =
        "\x01\u008a\x01\x00\x1d\uffff";
    const string DFA64_acceptS =
        "\x02\uffff\x10\x01\x01\x02\x0c\uffff";
    const string DFA64_specialS =
        "\x01\x00\x01\x01\x1d\uffff}>";
    static readonly string[] DFA64_transitionS = {
            "\x01\x0e\x01\uffff\x01\x07\x05\uffff\x02\x12\x01\x01\x01\uffff"+
            "\x01\x12\x01\uffff\x01\x04\x02\x0d\x06\uffff\x01\x10\x01\uffff"+
            "\x01\x08\x01\uffff\x01\x11\x02\uffff\x01\x09\x01\x0a\x01\uffff"+
            "\x01\x0b\x02\uffff\x01\x0c\x01\x0f\x02\x12\x13\uffff\x01\x03"+
            "\x04\x04\x01\x02\x01\x05\x08\x12\x02\x06",
            "\x01\uffff",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            ""
    };

    static readonly short[] DFA64_eot = DFA.UnpackEncodedString(DFA64_eotS);
    static readonly short[] DFA64_eof = DFA.UnpackEncodedString(DFA64_eofS);
    static readonly char[] DFA64_min = DFA.UnpackEncodedStringToUnsignedChars(DFA64_minS);
    static readonly char[] DFA64_max = DFA.UnpackEncodedStringToUnsignedChars(DFA64_maxS);
    static readonly short[] DFA64_accept = DFA.UnpackEncodedString(DFA64_acceptS);
    static readonly short[] DFA64_special = DFA.UnpackEncodedString(DFA64_specialS);
    static readonly short[][] DFA64_transition = DFA.UnpackEncodedStringArray(DFA64_transitionS);

    protected class DFA64 : DFA
    {
        public DFA64(BaseRecognizer recognizer)
        {
            this.recognizer = recognizer;
            this.decisionNumber = 64;
            this.eot = DFA64_eot;
            this.eof = DFA64_eof;
            this.min = DFA64_min;
            this.max = DFA64_max;
            this.accept = DFA64_accept;
            this.special = DFA64_special;
            this.transition = DFA64_transition;

        }

        override public string Description
        {
            get { return "528:1: initialOperations : ( ( statement )=> statement ( ( SCOLON statement )=> SCOLON statement )* -> ^( Prolog ( statement )* ) | declaration ( ( SCOLON declaration )=> SCOLON declaration )* ( ( SCOLON statement )=> SCOLON statement )* -> ^( Prolog ( declaration )* ( statement )* ) );"; }
        }

    }


    protected internal int DFA64_SpecialStateTransition(DFA dfa, int s, IIntStream _input) //throws NoViableAltException
    {
            ITokenStream input = (ITokenStream)_input;
    	int _s = s;
        switch ( s )
        {
               	case 0 : 
                   	int LA64_0 = input.LA(1);

                   	 
                   	int index64_0 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (LA64_0 == ID) ) { s = 1; }

                   	else if ( (LA64_0 == NEW) && (((synpred17_SimSharp() && (assignment==true))|| (synpred17_SimSharp() && (assignment==false))|| synpred17_SimSharp())) ) { s = 2; }

                   	else if ( (LA64_0 == NONE) && (((synpred17_SimSharp() && (assignment==false))|| (synpred17_SimSharp() && (assignment==true))|| synpred17_SimSharp())) ) { s = 3; }

                   	else if ( (LA64_0 == STRING || (LA64_0 >= NUM_INT && LA64_0 <= CHARCONST)) && (((synpred17_SimSharp() && (assignment==false))|| (synpred17_SimSharp() && (assignment==true))|| synpred17_SimSharp())) ) { s = 4; }

                   	else if ( (LA64_0 == THIS) && (((synpred17_SimSharp() && (assignment==true))|| (synpred17_SimSharp() && (assignment==false))|| synpred17_SimSharp())) ) { s = 5; }

                   	else if ( ((LA64_0 >= TRUE && LA64_0 <= FALSE)) && (((synpred17_SimSharp() && (assignment==false))|| (synpred17_SimSharp() && (assignment==true))|| synpred17_SimSharp())) ) { s = 6; }

                   	else if ( (LA64_0 == LPAR) && (((synpred17_SimSharp() && (assignment==false))|| (synpred17_SimSharp() && (assignment==true))|| synpred17_SimSharp())) ) { s = 7; }

                   	else if ( (LA64_0 == WHILE) && (synpred17_SimSharp()) ) { s = 8; }

                   	else if ( (LA64_0 == GOTO) && (synpred17_SimSharp()) ) { s = 9; }

                   	else if ( (LA64_0 == GO) && (synpred17_SimSharp()) ) { s = 10; }

                   	else if ( (LA64_0 == INSPECT) && (synpred17_SimSharp()) ) { s = 11; }

                   	else if ( (LA64_0 == BEGIN) && (synpred17_SimSharp()) ) { s = 12; }

                   	else if ( ((LA64_0 >= ACTIVATE && LA64_0 <= REACTIVATE)) && (synpred17_SimSharp()) ) { s = 13; }

                   	else if ( (LA64_0 == SCOLON) && (synpred17_SimSharp()) ) { s = 14; }

                   	else if ( (LA64_0 == END) && (synpred17_SimSharp()) ) { s = 15; }

                   	else if ( (LA64_0 == IF) && (synpred17_SimSharp()) ) { s = 16; }

                   	else if ( (LA64_0 == FOR) && (synpred17_SimSharp()) ) { s = 17; }

                   	else if ( ((LA64_0 >= EXTERNAL && LA64_0 <= PROCEDURE) || LA64_0 == CLASS || (LA64_0 >= ARRAY && LA64_0 <= SWITCH) || (LA64_0 >= BOOLEAN && LA64_0 <= REF)) ) { s = 18; }

                   	 
                   	input.Seek(index64_0);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 1 : 
                   	int LA64_1 = input.LA(1);

                   	 
                   	int index64_1 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (((synpred17_SimSharp() && (assignment==true))|| (synpred17_SimSharp() && (assignment==false))|| synpred17_SimSharp())) ) { s = 17; }

                   	else if ( (true) ) { s = 18; }

                   	 
                   	input.Seek(index64_1);
                   	if ( s >= 0 ) return s;
                   	break;
        }
        if (state.backtracking > 0) {state.failed = true; return -1;}
        NoViableAltException nvae64 =
            new NoViableAltException(dfa.Description, 64, _s, input);
        dfa.Error(nvae64);
        throw nvae64;
    }
    const string DFA70_eotS =
        "\x0c\uffff";
    const string DFA70_eofS =
        "\x0c\uffff";
    const string DFA70_minS =
        "\x01\x35\x0b\uffff";
    const string DFA70_maxS =
        "\x01\u008a\x0b\uffff";
    const string DFA70_acceptS =
        "\x01\uffff\x01\x01\x02\uffff\x07\x01\x01\x02";
    const string DFA70_specialS =
        "\x01\x00\x0b\uffff}>";
    static readonly string[] DFA70_transitionS = {
            "\x02\x01\x0a\uffff\x01\x0a\x07\uffff\x01\x09\x03\uffff\x01"+
            "\x05\x08\uffff\x01\x0b\x1b\uffff\x01\x01\x07\uffff\x01\x04\x04"+
            "\x05\x01\x06\x01\x07\x08\uffff\x02\x08",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            ""
    };

    static readonly short[] DFA70_eot = DFA.UnpackEncodedString(DFA70_eotS);
    static readonly short[] DFA70_eof = DFA.UnpackEncodedString(DFA70_eofS);
    static readonly char[] DFA70_min = DFA.UnpackEncodedStringToUnsignedChars(DFA70_minS);
    static readonly char[] DFA70_max = DFA.UnpackEncodedStringToUnsignedChars(DFA70_maxS);
    static readonly short[] DFA70_accept = DFA.UnpackEncodedString(DFA70_acceptS);
    static readonly short[] DFA70_special = DFA.UnpackEncodedString(DFA70_specialS);
    static readonly short[][] DFA70_transition = DFA.UnpackEncodedStringArray(DFA70_transitionS);

    protected class DFA70 : DFA
    {
        public DFA70(BaseRecognizer recognizer)
        {
            this.recognizer = recognizer;
            this.decisionNumber = 70;
            this.eot = DFA70_eot;
            this.eof = DFA70_eof;
            this.min = DFA70_min;
            this.max = DFA70_max;
            this.accept = DFA70_accept;
            this.special = DFA70_special;
            this.transition = DFA70_transition;

        }

        override public string Description
        {
            get { return "570:1: expression : ( simpleExpression | ifClause simpleExpression ELSE expression );"; }
        }

    }


    protected internal int DFA70_SpecialStateTransition(DFA dfa, int s, IIntStream _input) //throws NoViableAltException
    {
            ITokenStream input = (ITokenStream)_input;
    	int _s = s;
        switch ( s )
        {
               	case 0 : 
                   	int LA70_0 = input.LA(1);

                   	 
                   	int index70_0 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( ((LA70_0 >= PLUS && LA70_0 <= MINUS) || LA70_0 == NOT) ) { s = 1; }

                   	else if ( (LA70_0 == NONE) && (((assignment==false)|| (assignment==true))) ) { s = 4; }

                   	else if ( (LA70_0 == STRING || (LA70_0 >= NUM_INT && LA70_0 <= CHARCONST)) && (((assignment==false)|| (assignment==true))) ) { s = 5; }

                   	else if ( (LA70_0 == NEW) && (((assignment==false)|| (assignment==true))) ) { s = 6; }

                   	else if ( (LA70_0 == THIS) && (((assignment==false)|| (assignment==true))) ) { s = 7; }

                   	else if ( ((LA70_0 >= TRUE && LA70_0 <= FALSE)) && (((assignment==false)|| (assignment==true))) ) { s = 8; }

                   	else if ( (LA70_0 == ID) && (((assignment==false)|| (assignment==true))) ) { s = 9; }

                   	else if ( (LA70_0 == LPAR) && (((assignment==false)|| (assignment==true))) ) { s = 10; }

                   	else if ( (LA70_0 == IF) ) { s = 11; }

                   	 
                   	input.Seek(index70_0);
                   	if ( s >= 0 ) return s;
                   	break;
        }
        if (state.backtracking > 0) {state.failed = true; return -1;}
        NoViableAltException nvae70 =
            new NoViableAltException(dfa.Description, 70, _s, input);
        dfa.Error(nvae70);
        throw nvae70;
    }
    const string DFA72_eotS =
        "\x0d\uffff";
    const string DFA72_eofS =
        "\x0d\uffff";
    const string DFA72_minS =
        "\x01\x35\x0a\x00\x02\uffff";
    const string DFA72_maxS =
        "\x01\u008a\x0a\x00\x02\uffff";
    const string DFA72_acceptS =
        "\x0b\uffff\x01\x01\x01\x02";
    const string DFA72_specialS =
        "\x01\x00\x01\x01\x01\x02\x01\x03\x01\x04\x01\x05\x01\x06\x01\x07"+
        "\x01\x08\x01\x09\x01\x0a\x02\uffff}>";
    static readonly string[] DFA72_transitionS = {
            "\x01\x02\x01\x03\x0a\uffff\x01\x0a\x07\uffff\x01\x09\x03\uffff"+
            "\x01\x05\x24\uffff\x01\x01\x07\uffff\x01\x04\x04\x05\x01\x06"+
            "\x01\x07\x08\uffff\x02\x08",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "",
            ""
    };

    static readonly short[] DFA72_eot = DFA.UnpackEncodedString(DFA72_eotS);
    static readonly short[] DFA72_eof = DFA.UnpackEncodedString(DFA72_eofS);
    static readonly char[] DFA72_min = DFA.UnpackEncodedStringToUnsignedChars(DFA72_minS);
    static readonly char[] DFA72_max = DFA.UnpackEncodedStringToUnsignedChars(DFA72_maxS);
    static readonly short[] DFA72_accept = DFA.UnpackEncodedString(DFA72_acceptS);
    static readonly short[] DFA72_special = DFA.UnpackEncodedString(DFA72_specialS);
    static readonly short[][] DFA72_transition = DFA.UnpackEncodedStringArray(DFA72_transitionS);

    protected class DFA72 : DFA
    {
        public DFA72(BaseRecognizer recognizer)
        {
            this.recognizer = recognizer;
            this.decisionNumber = 72;
            this.eot = DFA72_eot;
            this.eof = DFA72_eof;
            this.min = DFA72_min;
            this.max = DFA72_max;
            this.accept = DFA72_accept;
            this.special = DFA72_special;
            this.transition = DFA72_transition;

        }

        override public string Description
        {
            get { return "608:1: conditionalExpression : ( ( booleanTertiary OR ELSE )=> booleanTertiary ( ( OR ELSE ) conditionalExpression ) -> ^( OrElse booleanTertiary conditionalExpression ) | booleanTertiary );"; }
        }

    }


    protected internal int DFA72_SpecialStateTransition(DFA dfa, int s, IIntStream _input) //throws NoViableAltException
    {
            ITokenStream input = (ITokenStream)_input;
    	int _s = s;
        switch ( s )
        {
               	case 0 : 
                   	int LA72_0 = input.LA(1);

                   	 
                   	int index72_0 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (LA72_0 == NOT) ) { s = 1; }

                   	else if ( (LA72_0 == PLUS) ) { s = 2; }

                   	else if ( (LA72_0 == MINUS) ) { s = 3; }

                   	else if ( (LA72_0 == NONE) && (((assignment==false)|| (assignment==true))) ) { s = 4; }

                   	else if ( (LA72_0 == STRING || (LA72_0 >= NUM_INT && LA72_0 <= CHARCONST)) && (((assignment==false)|| (assignment==true))) ) { s = 5; }

                   	else if ( (LA72_0 == NEW) && (((assignment==false)|| (assignment==true))) ) { s = 6; }

                   	else if ( (LA72_0 == THIS) && (((assignment==false)|| (assignment==true))) ) { s = 7; }

                   	else if ( ((LA72_0 >= TRUE && LA72_0 <= FALSE)) && (((assignment==false)|| (assignment==true))) ) { s = 8; }

                   	else if ( (LA72_0 == ID) && (((assignment==false)|| (assignment==true))) ) { s = 9; }

                   	else if ( (LA72_0 == LPAR) && (((assignment==false)|| (assignment==true))) ) { s = 10; }

                   	 
                   	input.Seek(index72_0);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 1 : 
                   	int LA72_1 = input.LA(1);

                   	 
                   	int index72_1 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred23_SimSharp()) ) { s = 11; }

                   	else if ( (true) ) { s = 12; }

                   	 
                   	input.Seek(index72_1);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 2 : 
                   	int LA72_2 = input.LA(1);

                   	 
                   	int index72_2 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred23_SimSharp()) ) { s = 11; }

                   	else if ( (true) ) { s = 12; }

                   	 
                   	input.Seek(index72_2);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 3 : 
                   	int LA72_3 = input.LA(1);

                   	 
                   	int index72_3 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred23_SimSharp()) ) { s = 11; }

                   	else if ( (true) ) { s = 12; }

                   	 
                   	input.Seek(index72_3);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 4 : 
                   	int LA72_4 = input.LA(1);

                   	 
                   	int index72_4 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (((synpred23_SimSharp() && (assignment==true))|| (synpred23_SimSharp() && (assignment==false))|| (synpred23_SimSharp() && (assignment==true))|| (synpred23_SimSharp() && (assignment==false)))) ) { s = 11; }

                   	else if ( (((assignment==false)|| (assignment==true))) ) { s = 12; }

                   	 
                   	input.Seek(index72_4);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 5 : 
                   	int LA72_5 = input.LA(1);

                   	 
                   	int index72_5 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (((synpred23_SimSharp() && (assignment==true))|| (synpred23_SimSharp() && (assignment==false))|| (synpred23_SimSharp() && (assignment==true))|| (synpred23_SimSharp() && (assignment==false)))) ) { s = 11; }

                   	else if ( (((assignment==false)|| (assignment==true))) ) { s = 12; }

                   	 
                   	input.Seek(index72_5);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 6 : 
                   	int LA72_6 = input.LA(1);

                   	 
                   	int index72_6 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (((synpred23_SimSharp() && (assignment==true))|| (synpred23_SimSharp() && (assignment==false))|| (synpred23_SimSharp() && (assignment==true))|| (synpred23_SimSharp() && (assignment==false)))) ) { s = 11; }

                   	else if ( (((assignment==false)|| (assignment==true))) ) { s = 12; }

                   	 
                   	input.Seek(index72_6);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 7 : 
                   	int LA72_7 = input.LA(1);

                   	 
                   	int index72_7 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (((synpred23_SimSharp() && (assignment==true))|| (synpred23_SimSharp() && (assignment==false))|| (synpred23_SimSharp() && (assignment==true))|| (synpred23_SimSharp() && (assignment==false)))) ) { s = 11; }

                   	else if ( (((assignment==false)|| (assignment==true))) ) { s = 12; }

                   	 
                   	input.Seek(index72_7);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 8 : 
                   	int LA72_8 = input.LA(1);

                   	 
                   	int index72_8 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (((synpred23_SimSharp() && (assignment==true))|| (synpred23_SimSharp() && (assignment==false))|| (synpred23_SimSharp() && (assignment==true))|| (synpred23_SimSharp() && (assignment==false)))) ) { s = 11; }

                   	else if ( (((assignment==false)|| (assignment==true))) ) { s = 12; }

                   	 
                   	input.Seek(index72_8);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 9 : 
                   	int LA72_9 = input.LA(1);

                   	 
                   	int index72_9 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (((synpred23_SimSharp() && (assignment==true))|| (synpred23_SimSharp() && (assignment==false))|| (synpred23_SimSharp() && (assignment==true))|| (synpred23_SimSharp() && (assignment==false)))) ) { s = 11; }

                   	else if ( (((assignment==false)|| (assignment==true))) ) { s = 12; }

                   	 
                   	input.Seek(index72_9);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 10 : 
                   	int LA72_10 = input.LA(1);

                   	 
                   	int index72_10 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (((synpred23_SimSharp() && (assignment==true))|| (synpred23_SimSharp() && (assignment==false))|| (synpred23_SimSharp() && (assignment==true))|| (synpred23_SimSharp() && (assignment==false)))) ) { s = 11; }

                   	else if ( (((assignment==false)|| (assignment==true))) ) { s = 12; }

                   	 
                   	input.Seek(index72_10);
                   	if ( s >= 0 ) return s;
                   	break;
        }
        if (state.backtracking > 0) {state.failed = true; return -1;}
        NoViableAltException nvae72 =
            new NoViableAltException(dfa.Description, 72, _s, input);
        dfa.Error(nvae72);
        throw nvae72;
    }
    const string DFA73_eotS =
        "\x0d\uffff";
    const string DFA73_eofS =
        "\x0d\uffff";
    const string DFA73_minS =
        "\x01\x35\x0a\x00\x02\uffff";
    const string DFA73_maxS =
        "\x01\u008a\x0a\x00\x02\uffff";
    const string DFA73_acceptS =
        "\x0b\uffff\x01\x01\x01\x02";
    const string DFA73_specialS =
        "\x01\x00\x01\x01\x01\x02\x01\x03\x01\x04\x01\x05\x01\x06\x01\x07"+
        "\x01\x08\x01\x09\x01\x0a\x02\uffff}>";
    static readonly string[] DFA73_transitionS = {
            "\x01\x02\x01\x03\x0a\uffff\x01\x0a\x07\uffff\x01\x09\x03\uffff"+
            "\x01\x05\x24\uffff\x01\x01\x07\uffff\x01\x04\x04\x05\x01\x06"+
            "\x01\x07\x08\uffff\x02\x08",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "",
            ""
    };

    static readonly short[] DFA73_eot = DFA.UnpackEncodedString(DFA73_eotS);
    static readonly short[] DFA73_eof = DFA.UnpackEncodedString(DFA73_eofS);
    static readonly char[] DFA73_min = DFA.UnpackEncodedStringToUnsignedChars(DFA73_minS);
    static readonly char[] DFA73_max = DFA.UnpackEncodedStringToUnsignedChars(DFA73_maxS);
    static readonly short[] DFA73_accept = DFA.UnpackEncodedString(DFA73_acceptS);
    static readonly short[] DFA73_special = DFA.UnpackEncodedString(DFA73_specialS);
    static readonly short[][] DFA73_transition = DFA.UnpackEncodedStringArray(DFA73_transitionS);

    protected class DFA73 : DFA
    {
        public DFA73(BaseRecognizer recognizer)
        {
            this.recognizer = recognizer;
            this.decisionNumber = 73;
            this.eot = DFA73_eot;
            this.eof = DFA73_eof;
            this.min = DFA73_min;
            this.max = DFA73_max;
            this.accept = DFA73_accept;
            this.special = DFA73_special;
            this.transition = DFA73_transition;

        }

        override public string Description
        {
            get { return "613:1: booleanTertiary : ( ( equivalence AND THEN )=> equivalence ( ( AND THEN ) booleanTertiary ) -> ^( AndThen equivalence booleanTertiary ) | equivalence );"; }
        }

    }


    protected internal int DFA73_SpecialStateTransition(DFA dfa, int s, IIntStream _input) //throws NoViableAltException
    {
            ITokenStream input = (ITokenStream)_input;
    	int _s = s;
        switch ( s )
        {
               	case 0 : 
                   	int LA73_0 = input.LA(1);

                   	 
                   	int index73_0 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (LA73_0 == NOT) ) { s = 1; }

                   	else if ( (LA73_0 == PLUS) ) { s = 2; }

                   	else if ( (LA73_0 == MINUS) ) { s = 3; }

                   	else if ( (LA73_0 == NONE) && (((assignment==false)|| (assignment==true))) ) { s = 4; }

                   	else if ( (LA73_0 == STRING || (LA73_0 >= NUM_INT && LA73_0 <= CHARCONST)) && (((assignment==false)|| (assignment==true))) ) { s = 5; }

                   	else if ( (LA73_0 == NEW) && (((assignment==false)|| (assignment==true))) ) { s = 6; }

                   	else if ( (LA73_0 == THIS) && (((assignment==false)|| (assignment==true))) ) { s = 7; }

                   	else if ( ((LA73_0 >= TRUE && LA73_0 <= FALSE)) && (((assignment==false)|| (assignment==true))) ) { s = 8; }

                   	else if ( (LA73_0 == ID) && (((assignment==false)|| (assignment==true))) ) { s = 9; }

                   	else if ( (LA73_0 == LPAR) && (((assignment==false)|| (assignment==true))) ) { s = 10; }

                   	 
                   	input.Seek(index73_0);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 1 : 
                   	int LA73_1 = input.LA(1);

                   	 
                   	int index73_1 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred24_SimSharp()) ) { s = 11; }

                   	else if ( (true) ) { s = 12; }

                   	 
                   	input.Seek(index73_1);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 2 : 
                   	int LA73_2 = input.LA(1);

                   	 
                   	int index73_2 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred24_SimSharp()) ) { s = 11; }

                   	else if ( (true) ) { s = 12; }

                   	 
                   	input.Seek(index73_2);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 3 : 
                   	int LA73_3 = input.LA(1);

                   	 
                   	int index73_3 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred24_SimSharp()) ) { s = 11; }

                   	else if ( (true) ) { s = 12; }

                   	 
                   	input.Seek(index73_3);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 4 : 
                   	int LA73_4 = input.LA(1);

                   	 
                   	int index73_4 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (((synpred24_SimSharp() && (assignment==true))|| (synpred24_SimSharp() && (assignment==false)))) ) { s = 11; }

                   	else if ( (((assignment==false)|| (assignment==true))) ) { s = 12; }

                   	 
                   	input.Seek(index73_4);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 5 : 
                   	int LA73_5 = input.LA(1);

                   	 
                   	int index73_5 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (((synpred24_SimSharp() && (assignment==true))|| (synpred24_SimSharp() && (assignment==false)))) ) { s = 11; }

                   	else if ( (((assignment==false)|| (assignment==true))) ) { s = 12; }

                   	 
                   	input.Seek(index73_5);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 6 : 
                   	int LA73_6 = input.LA(1);

                   	 
                   	int index73_6 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (((synpred24_SimSharp() && (assignment==true))|| (synpred24_SimSharp() && (assignment==false)))) ) { s = 11; }

                   	else if ( (((assignment==false)|| (assignment==true))) ) { s = 12; }

                   	 
                   	input.Seek(index73_6);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 7 : 
                   	int LA73_7 = input.LA(1);

                   	 
                   	int index73_7 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (((synpred24_SimSharp() && (assignment==true))|| (synpred24_SimSharp() && (assignment==false)))) ) { s = 11; }

                   	else if ( (((assignment==false)|| (assignment==true))) ) { s = 12; }

                   	 
                   	input.Seek(index73_7);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 8 : 
                   	int LA73_8 = input.LA(1);

                   	 
                   	int index73_8 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (((synpred24_SimSharp() && (assignment==true))|| (synpred24_SimSharp() && (assignment==false)))) ) { s = 11; }

                   	else if ( (((assignment==false)|| (assignment==true))) ) { s = 12; }

                   	 
                   	input.Seek(index73_8);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 9 : 
                   	int LA73_9 = input.LA(1);

                   	 
                   	int index73_9 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (((synpred24_SimSharp() && (assignment==true))|| (synpred24_SimSharp() && (assignment==false)))) ) { s = 11; }

                   	else if ( (((assignment==false)|| (assignment==true))) ) { s = 12; }

                   	 
                   	input.Seek(index73_9);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 10 : 
                   	int LA73_10 = input.LA(1);

                   	 
                   	int index73_10 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (((synpred24_SimSharp() && (assignment==true))|| (synpred24_SimSharp() && (assignment==false)))) ) { s = 11; }

                   	else if ( (((assignment==false)|| (assignment==true))) ) { s = 12; }

                   	 
                   	input.Seek(index73_10);
                   	if ( s >= 0 ) return s;
                   	break;
        }
        if (state.backtracking > 0) {state.failed = true; return -1;}
        NoViableAltException nvae73 =
            new NoViableAltException(dfa.Description, 73, _s, input);
        dfa.Error(nvae73);
        throw nvae73;
    }
    const string DFA76_eotS =
        "\x17\uffff";
    const string DFA76_eofS =
        "\x01\x01\x16\uffff";
    const string DFA76_minS =
        "\x01\x3f\x03\uffff\x01\x00\x12\uffff";
    const string DFA76_maxS =
        "\x01\x71\x03\uffff\x01\x00\x12\uffff";
    const string DFA76_acceptS =
        "\x01\uffff\x01\x02\x14\uffff\x01\x01";
    const string DFA76_specialS =
        "\x04\uffff\x01\x00\x12\uffff}>";
    static readonly string[] DFA76_transitionS = {
            "\x02\x01\x01\uffff\x01\x01\x01\uffff\x01\x01\x0b\uffff\x06"+
            "\x01\x01\uffff\x03\x01\x01\uffff\x02\x01\x04\uffff\x02\x01\x01"+
            "\uffff\x01\x01\x09\uffff\x01\x04\x03\x01",
            "",
            "",
            "",
            "\x01\uffff",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            ""
    };

    static readonly short[] DFA76_eot = DFA.UnpackEncodedString(DFA76_eotS);
    static readonly short[] DFA76_eof = DFA.UnpackEncodedString(DFA76_eofS);
    static readonly char[] DFA76_min = DFA.UnpackEncodedStringToUnsignedChars(DFA76_minS);
    static readonly char[] DFA76_max = DFA.UnpackEncodedStringToUnsignedChars(DFA76_maxS);
    static readonly short[] DFA76_accept = DFA.UnpackEncodedString(DFA76_acceptS);
    static readonly short[] DFA76_special = DFA.UnpackEncodedString(DFA76_specialS);
    static readonly short[][] DFA76_transition = DFA.UnpackEncodedStringArray(DFA76_transitionS);

    protected class DFA76 : DFA
    {
        public DFA76(BaseRecognizer recognizer)
        {
            this.recognizer = recognizer;
            this.decisionNumber = 76;
            this.eot = DFA76_eot;
            this.eof = DFA76_eof;
            this.min = DFA76_min;
            this.max = DFA76_max;
            this.accept = DFA76_accept;
            this.special = DFA76_special;
            this.transition = DFA76_transition;

        }

        override public string Description
        {
            get { return "()* loopback of 627:18: ( ( OR ~ ELSE )=> OR booleanFactor )*"; }
        }

    }


    protected internal int DFA76_SpecialStateTransition(DFA dfa, int s, IIntStream _input) //throws NoViableAltException
    {
            ITokenStream input = (ITokenStream)_input;
    	int _s = s;
        switch ( s )
        {
               	case 0 : 
                   	int LA76_4 = input.LA(1);

                   	 
                   	int index76_4 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred25_SimSharp()) ) { s = 22; }

                   	else if ( (true) ) { s = 1; }

                   	 
                   	input.Seek(index76_4);
                   	if ( s >= 0 ) return s;
                   	break;
        }
        if (state.backtracking > 0) {state.failed = true; return -1;}
        NoViableAltException nvae76 =
            new NoViableAltException(dfa.Description, 76, _s, input);
        dfa.Error(nvae76);
        throw nvae76;
    }
    const string DFA77_eotS =
        "\x17\uffff";
    const string DFA77_eofS =
        "\x01\x01\x16\uffff";
    const string DFA77_minS =
        "\x01\x3f\x03\uffff\x01\x00\x12\uffff";
    const string DFA77_maxS =
        "\x01\x71\x03\uffff\x01\x00\x12\uffff";
    const string DFA77_acceptS =
        "\x01\uffff\x01\x02\x14\uffff\x01\x01";
    const string DFA77_specialS =
        "\x04\uffff\x01\x00\x12\uffff}>";
    static readonly string[] DFA77_transitionS = {
            "\x02\x01\x01\uffff\x01\x01\x01\uffff\x01\x01\x0b\uffff\x06"+
            "\x01\x01\uffff\x03\x01\x01\uffff\x02\x01\x04\uffff\x02\x01\x01"+
            "\uffff\x01\x01\x09\uffff\x01\x01\x01\x04\x02\x01",
            "",
            "",
            "",
            "\x01\uffff",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            ""
    };

    static readonly short[] DFA77_eot = DFA.UnpackEncodedString(DFA77_eotS);
    static readonly short[] DFA77_eof = DFA.UnpackEncodedString(DFA77_eofS);
    static readonly char[] DFA77_min = DFA.UnpackEncodedStringToUnsignedChars(DFA77_minS);
    static readonly char[] DFA77_max = DFA.UnpackEncodedStringToUnsignedChars(DFA77_maxS);
    static readonly short[] DFA77_accept = DFA.UnpackEncodedString(DFA77_acceptS);
    static readonly short[] DFA77_special = DFA.UnpackEncodedString(DFA77_specialS);
    static readonly short[][] DFA77_transition = DFA.UnpackEncodedStringArray(DFA77_transitionS);

    protected class DFA77 : DFA
    {
        public DFA77(BaseRecognizer recognizer)
        {
            this.recognizer = recognizer;
            this.decisionNumber = 77;
            this.eot = DFA77_eot;
            this.eof = DFA77_eof;
            this.min = DFA77_min;
            this.max = DFA77_max;
            this.accept = DFA77_accept;
            this.special = DFA77_special;
            this.transition = DFA77_transition;

        }

        override public string Description
        {
            get { return "()* loopback of 631:21: ( ( AND ~ THEN )=> AND booleanSecondary )*"; }
        }

    }


    protected internal int DFA77_SpecialStateTransition(DFA dfa, int s, IIntStream _input) //throws NoViableAltException
    {
            ITokenStream input = (ITokenStream)_input;
    	int _s = s;
        switch ( s )
        {
               	case 0 : 
                   	int LA77_4 = input.LA(1);

                   	 
                   	int index77_4 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred26_SimSharp()) ) { s = 22; }

                   	else if ( (true) ) { s = 1; }

                   	 
                   	input.Seek(index77_4);
                   	if ( s >= 0 ) return s;
                   	break;
        }
        if (state.backtracking > 0) {state.failed = true; return -1;}
        NoViableAltException nvae77 =
            new NoViableAltException(dfa.Description, 77, _s, input);
        dfa.Error(nvae77);
        throw nvae77;
    }
    const string DFA78_eotS =
        "\x0b\uffff";
    const string DFA78_eofS =
        "\x0b\uffff";
    const string DFA78_minS =
        "\x01\x35\x0a\uffff";
    const string DFA78_maxS =
        "\x01\u008a\x0a\uffff";
    const string DFA78_acceptS =
        "\x01\uffff\x01\x01\x01\x02\x01\uffff\x07\x02";
    const string DFA78_specialS =
        "\x01\x00\x0a\uffff}>";
    static readonly string[] DFA78_transitionS = {
            "\x02\x02\x0a\uffff\x01\x0a\x07\uffff\x01\x09\x03\uffff\x01"+
            "\x05\x24\uffff\x01\x01\x07\uffff\x01\x04\x04\x05\x01\x06\x01"+
            "\x07\x08\uffff\x02\x08",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            ""
    };

    static readonly short[] DFA78_eot = DFA.UnpackEncodedString(DFA78_eotS);
    static readonly short[] DFA78_eof = DFA.UnpackEncodedString(DFA78_eofS);
    static readonly char[] DFA78_min = DFA.UnpackEncodedStringToUnsignedChars(DFA78_minS);
    static readonly char[] DFA78_max = DFA.UnpackEncodedStringToUnsignedChars(DFA78_maxS);
    static readonly short[] DFA78_accept = DFA.UnpackEncodedString(DFA78_acceptS);
    static readonly short[] DFA78_special = DFA.UnpackEncodedString(DFA78_specialS);
    static readonly short[][] DFA78_transition = DFA.UnpackEncodedStringArray(DFA78_transitionS);

    protected class DFA78 : DFA
    {
        public DFA78(BaseRecognizer recognizer)
        {
            this.recognizer = recognizer;
            this.decisionNumber = 78;
            this.eot = DFA78_eot;
            this.eof = DFA78_eof;
            this.min = DFA78_min;
            this.max = DFA78_max;
            this.accept = DFA78_accept;
            this.special = DFA78_special;
            this.transition = DFA78_transition;

        }

        override public string Description
        {
            get { return "635:4: ( NOT )?"; }
        }

    }


    protected internal int DFA78_SpecialStateTransition(DFA dfa, int s, IIntStream _input) //throws NoViableAltException
    {
            ITokenStream input = (ITokenStream)_input;
    	int _s = s;
        switch ( s )
        {
               	case 0 : 
                   	int LA78_0 = input.LA(1);

                   	 
                   	int index78_0 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (LA78_0 == NOT) ) { s = 1; }

                   	else if ( ((LA78_0 >= PLUS && LA78_0 <= MINUS)) ) { s = 2; }

                   	else if ( (LA78_0 == NONE) && (((assignment==false)|| (assignment==true))) ) { s = 4; }

                   	else if ( (LA78_0 == STRING || (LA78_0 >= NUM_INT && LA78_0 <= CHARCONST)) && (((assignment==false)|| (assignment==true))) ) { s = 5; }

                   	else if ( (LA78_0 == NEW) && (((assignment==false)|| (assignment==true))) ) { s = 6; }

                   	else if ( (LA78_0 == THIS) && (((assignment==false)|| (assignment==true))) ) { s = 7; }

                   	else if ( ((LA78_0 >= TRUE && LA78_0 <= FALSE)) && (((assignment==false)|| (assignment==true))) ) { s = 8; }

                   	else if ( (LA78_0 == ID) && (((assignment==false)|| (assignment==true))) ) { s = 9; }

                   	else if ( (LA78_0 == LPAR) && (((assignment==false)|| (assignment==true))) ) { s = 10; }

                   	 
                   	input.Seek(index78_0);
                   	if ( s >= 0 ) return s;
                   	break;
        }
        if (state.backtracking > 0) {state.failed = true; return -1;}
        NoViableAltException nvae78 =
            new NoViableAltException(dfa.Description, 78, _s, input);
        dfa.Error(nvae78);
        throw nvae78;
    }
    const string DFA85_eotS =
        "\x0a\uffff";
    const string DFA85_eofS =
        "\x0a\uffff";
    const string DFA85_minS =
        "\x01\x35\x09\uffff";
    const string DFA85_maxS =
        "\x01\u008a\x09\uffff";
    const string DFA85_acceptS =
        "\x01\uffff\x01\x01\x01\x02\x07\x03";
    const string DFA85_specialS =
        "\x01\x00\x09\uffff}>";
    static readonly string[] DFA85_transitionS = {
            "\x01\x01\x01\x02\x0a\uffff\x01\x09\x07\uffff\x01\x08\x03\uffff"+
            "\x01\x04\x2c\uffff\x01\x03\x04\x04\x01\x05\x01\x06\x08\uffff"+
            "\x02\x07",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            ""
    };

    static readonly short[] DFA85_eot = DFA.UnpackEncodedString(DFA85_eotS);
    static readonly short[] DFA85_eof = DFA.UnpackEncodedString(DFA85_eofS);
    static readonly char[] DFA85_min = DFA.UnpackEncodedStringToUnsignedChars(DFA85_minS);
    static readonly char[] DFA85_max = DFA.UnpackEncodedStringToUnsignedChars(DFA85_maxS);
    static readonly short[] DFA85_accept = DFA.UnpackEncodedString(DFA85_acceptS);
    static readonly short[] DFA85_special = DFA.UnpackEncodedString(DFA85_specialS);
    static readonly short[][] DFA85_transition = DFA.UnpackEncodedStringArray(DFA85_transitionS);

    protected class DFA85 : DFA
    {
        public DFA85(BaseRecognizer recognizer)
        {
            this.recognizer = recognizer;
            this.decisionNumber = 85;
            this.eot = DFA85_eot;
            this.eof = DFA85_eof;
            this.min = DFA85_min;
            this.max = DFA85_max;
            this.accept = DFA85_accept;
            this.special = DFA85_special;
            this.transition = DFA85_transition;

        }

        override public string Description
        {
            get { return "668:1: unaryExpression : ( PLUS unaryExpression -> ^( Unary PLUS unaryExpression ) | MINUS unaryExpression -> ^( Unary MINUS unaryExpression ) | postfixExpression );"; }
        }

    }


    protected internal int DFA85_SpecialStateTransition(DFA dfa, int s, IIntStream _input) //throws NoViableAltException
    {
            ITokenStream input = (ITokenStream)_input;
    	int _s = s;
        switch ( s )
        {
               	case 0 : 
                   	int LA85_0 = input.LA(1);

                   	 
                   	int index85_0 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (LA85_0 == PLUS) ) { s = 1; }

                   	else if ( (LA85_0 == MINUS) ) { s = 2; }

                   	else if ( (LA85_0 == NONE) && (((assignment==false)|| (assignment==true))) ) { s = 3; }

                   	else if ( (LA85_0 == STRING || (LA85_0 >= NUM_INT && LA85_0 <= CHARCONST)) && (((assignment==false)|| (assignment==true))) ) { s = 4; }

                   	else if ( (LA85_0 == NEW) && (((assignment==false)|| (assignment==true))) ) { s = 5; }

                   	else if ( (LA85_0 == THIS) && (((assignment==false)|| (assignment==true))) ) { s = 6; }

                   	else if ( ((LA85_0 >= TRUE && LA85_0 <= FALSE)) && (((assignment==false)|| (assignment==true))) ) { s = 7; }

                   	else if ( (LA85_0 == ID) && (((assignment==false)|| (assignment==true))) ) { s = 8; }

                   	else if ( (LA85_0 == LPAR) && (((assignment==false)|| (assignment==true))) ) { s = 9; }

                   	 
                   	input.Seek(index85_0);
                   	if ( s >= 0 ) return s;
                   	break;
        }
        if (state.backtracking > 0) {state.failed = true; return -1;}
        NoViableAltException nvae85 =
            new NoViableAltException(dfa.Description, 85, _s, input);
        dfa.Error(nvae85);
        throw nvae85;
    }
    const string DFA88_eotS =
        "\x0a\uffff";
    const string DFA88_eofS =
        "\x0a\uffff";
    const string DFA88_minS =
        "\x01\x41\x07\x00\x02\uffff";
    const string DFA88_maxS =
        "\x01\u008a\x07\x00\x02\uffff";
    const string DFA88_acceptS =
        "\x08\uffff\x01\x01\x01\x02";
    const string DFA88_specialS =
        "\x01\x00\x01\x01\x01\x02\x01\x03\x01\x04\x01\x05\x01\x06\x01\x07"+
        "\x02\uffff}>";
    static readonly string[] DFA88_transitionS = {
            "\x01\x07\x07\uffff\x01\x06\x03\uffff\x01\x02\x2c\uffff\x01"+
            "\x01\x04\x02\x01\x03\x01\x04\x08\uffff\x02\x05",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "",
            ""
    };

    static readonly short[] DFA88_eot = DFA.UnpackEncodedString(DFA88_eotS);
    static readonly short[] DFA88_eof = DFA.UnpackEncodedString(DFA88_eofS);
    static readonly char[] DFA88_min = DFA.UnpackEncodedStringToUnsignedChars(DFA88_minS);
    static readonly char[] DFA88_max = DFA.UnpackEncodedStringToUnsignedChars(DFA88_maxS);
    static readonly short[] DFA88_accept = DFA.UnpackEncodedString(DFA88_acceptS);
    static readonly short[] DFA88_special = DFA.UnpackEncodedString(DFA88_specialS);
    static readonly short[][] DFA88_transition = DFA.UnpackEncodedStringArray(DFA88_transitionS);

    protected class DFA88 : DFA
    {
        public DFA88(BaseRecognizer recognizer)
        {
            this.recognizer = recognizer;
            this.decisionNumber = 88;
            this.eot = DFA88_eot;
            this.eof = DFA88_eof;
            this.min = DFA88_min;
            this.max = DFA88_max;
            this.accept = DFA88_accept;
            this.special = DFA88_special;
            this.transition = DFA88_transition;

        }

        override public string Description
        {
            get { return "674:1: postfixExpression : ({...}? => ( qualifierExpression -> qualifierExpression ) ( ( ( DOT e= qualifierExpression -> ^( RemoteAssign $postfixExpression $e) )* ) ) | {...}? => ( qualifierExpression -> qualifierExpression ) ( ( ( DOT e= qualifierExpression -> ^( RemoteAccess $postfixExpression $e) )* ) ) );"; }
        }

    }


    protected internal int DFA88_SpecialStateTransition(DFA dfa, int s, IIntStream _input) //throws NoViableAltException
    {
            ITokenStream input = (ITokenStream)_input;
    	int _s = s;
        switch ( s )
        {
               	case 0 : 
                   	int LA88_0 = input.LA(1);

                   	 
                   	int index88_0 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (LA88_0 == NONE) && (((assignment==false)|| (assignment==true))) ) { s = 1; }

                   	else if ( (LA88_0 == STRING || (LA88_0 >= NUM_INT && LA88_0 <= CHARCONST)) && (((assignment==false)|| (assignment==true))) ) { s = 2; }

                   	else if ( (LA88_0 == NEW) && (((assignment==false)|| (assignment==true))) ) { s = 3; }

                   	else if ( (LA88_0 == THIS) && (((assignment==false)|| (assignment==true))) ) { s = 4; }

                   	else if ( ((LA88_0 >= TRUE && LA88_0 <= FALSE)) && (((assignment==false)|| (assignment==true))) ) { s = 5; }

                   	else if ( (LA88_0 == ID) && (((assignment==false)|| (assignment==true))) ) { s = 6; }

                   	else if ( (LA88_0 == LPAR) && (((assignment==false)|| (assignment==true))) ) { s = 7; }

                   	 
                   	input.Seek(index88_0);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 1 : 
                   	int LA88_1 = input.LA(1);

                   	 
                   	int index88_1 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( ((assignment==true)) ) { s = 8; }

                   	else if ( ((assignment==false)) ) { s = 9; }

                   	 
                   	input.Seek(index88_1);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 2 : 
                   	int LA88_2 = input.LA(1);

                   	 
                   	int index88_2 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( ((assignment==true)) ) { s = 8; }

                   	else if ( ((assignment==false)) ) { s = 9; }

                   	 
                   	input.Seek(index88_2);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 3 : 
                   	int LA88_3 = input.LA(1);

                   	 
                   	int index88_3 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( ((assignment==true)) ) { s = 8; }

                   	else if ( ((assignment==false)) ) { s = 9; }

                   	 
                   	input.Seek(index88_3);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 4 : 
                   	int LA88_4 = input.LA(1);

                   	 
                   	int index88_4 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( ((assignment==true)) ) { s = 8; }

                   	else if ( ((assignment==false)) ) { s = 9; }

                   	 
                   	input.Seek(index88_4);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 5 : 
                   	int LA88_5 = input.LA(1);

                   	 
                   	int index88_5 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( ((assignment==true)) ) { s = 8; }

                   	else if ( ((assignment==false)) ) { s = 9; }

                   	 
                   	input.Seek(index88_5);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 6 : 
                   	int LA88_6 = input.LA(1);

                   	 
                   	int index88_6 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( ((assignment==true)) ) { s = 8; }

                   	else if ( ((assignment==false)) ) { s = 9; }

                   	 
                   	input.Seek(index88_6);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 7 : 
                   	int LA88_7 = input.LA(1);

                   	 
                   	int index88_7 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( ((assignment==true)) ) { s = 8; }

                   	else if ( ((assignment==false)) ) { s = 9; }

                   	 
                   	input.Seek(index88_7);
                   	if ( s >= 0 ) return s;
                   	break;
        }
        if (state.backtracking > 0) {state.failed = true; return -1;}
        NoViableAltException nvae88 =
            new NoViableAltException(dfa.Description, 88, _s, input);
        dfa.Error(nvae88);
        throw nvae88;
    }
    const string DFA95_eotS =
        "\x21\uffff";
    const string DFA95_eofS =
        "\x01\x02\x20\uffff";
    const string DFA95_minS =
        "\x01\x35\x20\uffff";
    const string DFA95_maxS =
        "\x01\x79\x20\uffff";
    const string DFA95_acceptS =
        "\x01\uffff\x01\x01\x01\x02\x1e\uffff";
    const string DFA95_specialS =
        "\x01\x00\x20\uffff}>";
    static readonly string[] DFA95_transitionS = {
            "\x07\x02\x01\uffff\x04\x02\x01\x01\x05\x02\x03\uffff\x01\x02"+
            "\x01\uffff\x01\x02\x03\uffff\x06\x02\x01\uffff\x03\x02\x01\uffff"+
            "\x02\x02\x04\uffff\x02\x02\x01\uffff\x01\x02\x09\uffff\x04\x02"+
            "\x01\uffff\x07\x02",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            ""
    };

    static readonly short[] DFA95_eot = DFA.UnpackEncodedString(DFA95_eotS);
    static readonly short[] DFA95_eof = DFA.UnpackEncodedString(DFA95_eofS);
    static readonly char[] DFA95_min = DFA.UnpackEncodedStringToUnsignedChars(DFA95_minS);
    static readonly char[] DFA95_max = DFA.UnpackEncodedStringToUnsignedChars(DFA95_maxS);
    static readonly short[] DFA95_accept = DFA.UnpackEncodedString(DFA95_acceptS);
    static readonly short[] DFA95_special = DFA.UnpackEncodedString(DFA95_specialS);
    static readonly short[][] DFA95_transition = DFA.UnpackEncodedStringArray(DFA95_transitionS);

    protected class DFA95 : DFA
    {
        public DFA95(BaseRecognizer recognizer)
        {
            this.recognizer = recognizer;
            this.decisionNumber = 95;
            this.eot = DFA95_eot;
            this.eof = DFA95_eof;
            this.min = DFA95_min;
            this.max = DFA95_max;
            this.accept = DFA95_accept;
            this.special = DFA95_special;
            this.transition = DFA95_transition;

        }

        override public string Description
        {
            get { return "740:25: ( ( LPAR )=> actualParameterPart )?"; }
        }

    }


    protected internal int DFA95_SpecialStateTransition(DFA dfa, int s, IIntStream _input) //throws NoViableAltException
    {
            ITokenStream input = (ITokenStream)_input;
    	int _s = s;
        switch ( s )
        {
               	case 0 : 
                   	int LA95_0 = input.LA(1);

                   	 
                   	int index95_0 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (LA95_0 == LPAR) && (synpred27_SimSharp()) ) { s = 1; }

                   	else if ( (LA95_0 == EOF || (LA95_0 >= PLUS && LA95_0 <= CONCAT) || (LA95_0 >= REFEQ && LA95_0 <= COLON) || (LA95_0 >= RPAR && LA95_0 <= REFASSIGN) || LA95_0 == IS || LA95_0 == EQ || (LA95_0 >= BEFORE && LA95_0 <= ELSE) || (LA95_0 >= THEN && LA95_0 <= DO) || (LA95_0 >= STEP && LA95_0 <= UNTIL) || (LA95_0 >= WHEN && LA95_0 <= OTHERWISE) || LA95_0 == END || (LA95_0 >= OR && LA95_0 <= IMP) || (LA95_0 >= IN && LA95_0 <= QUA)) ) { s = 2; }

                   	 
                   	input.Seek(index95_0);
                   	if ( s >= 0 ) return s;
                   	break;
        }
        if (state.backtracking > 0) {state.failed = true; return -1;}
        NoViableAltException nvae95 =
            new NoViableAltException(dfa.Description, 95, _s, input);
        dfa.Error(nvae95);
        throw nvae95;
    }
 

    public static readonly BitSet FOLLOW_simulaSourceModule_in_begin637 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_externalHead_in_simulaSourceModule660 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000800000B00UL,0x00000000000001FEUL});
    public static readonly BitSet FOLLOW_program_in_simulaSourceModule668 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_procedureDeclaration_in_simulaSourceModule672 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_classDeclaration_in_simulaSourceModule687 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_externalDeclaration_in_externalHead717 = new BitSet(new ulong[]{0x8000000000000000UL});
    public static readonly BitSet FOLLOW_SCOLON_in_externalHead719 = new BitSet(new ulong[]{0x0000000000000002UL,0x0000000000000080UL});
    public static readonly BitSet FOLLOW_externalDeclaration_in_externalHead722 = new BitSet(new ulong[]{0x8000000000000000UL});
    public static readonly BitSet FOLLOW_SCOLON_in_externalHead724 = new BitSet(new ulong[]{0x0000000000000002UL,0x0000000000000080UL});
    public static readonly BitSet FOLLOW_externalProcedureDeclaration_in_externalDeclaration739 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_externalClassDeclaration_in_externalDeclaration760 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_block_in_program776 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_EXTERNAL_in_externalProcedureDeclaration824 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000300UL,0x00000000000001FEUL});
    public static readonly BitSet FOLLOW_kind_in_externalProcedureDeclaration827 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000100UL,0x00000000000001FEUL});
    public static readonly BitSet FOLLOW_type_in_externalProcedureDeclaration832 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000100UL});
    public static readonly BitSet FOLLOW_PROCEDURE_in_externalProcedureDeclaration836 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000200UL});
    public static readonly BitSet FOLLOW_externalList_in_externalProcedureDeclaration838 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_EXTERNAL_in_externalProcedureDeclaration850 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000200UL});
    public static readonly BitSet FOLLOW_kind_in_externalProcedureDeclaration852 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000100UL});
    public static readonly BitSet FOLLOW_PROCEDURE_in_externalProcedureDeclaration854 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000200UL});
    public static readonly BitSet FOLLOW_externalItem_in_externalProcedureDeclaration856 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000400UL});
    public static readonly BitSet FOLLOW_procedureSpecification_in_externalProcedureDeclaration858 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_ID_in_kind868 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_IS_in_procedureSpecification879 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000100UL,0x00000000000001FEUL});
    public static readonly BitSet FOLLOW_procedureDeclaration_in_procedureSpecification881 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_EXTERNAL_in_externalClassDeclaration892 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000800UL});
    public static readonly BitSet FOLLOW_CLASS_in_externalClassDeclaration894 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000200UL});
    public static readonly BitSet FOLLOW_externalList_in_externalClassDeclaration896 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_externalItem_in_externalList907 = new BitSet(new ulong[]{0x0000000000000002UL,0x0000000000000010UL});
    public static readonly BitSet FOLLOW_COMMA_in_externalList911 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000200UL});
    public static readonly BitSet FOLLOW_externalItem_in_externalList913 = new BitSet(new ulong[]{0x0000000000000002UL,0x0000000000000010UL});
    public static readonly BitSet FOLLOW_ID_in_externalItem927 = new BitSet(new ulong[]{0x0000000000000002UL,0x0000000000001000UL});
    public static readonly BitSet FOLLOW_EQ_in_externalItem931 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000002000UL});
    public static readonly BitSet FOLLOW_externalIdentification_in_externalItem933 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_STRING_in_externalIdentification947 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_activationClause_in_activationStatement962 = new BitSet(new ulong[]{0x0000000000000002UL,0x00000000001B0000UL});
    public static readonly BitSet FOLLOW_schedulingClause_in_activationStatement966 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_activator_in_activationClause981 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC04000000402202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_objectExpression_in_activationClause983 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_set_in_activator0 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_timingClause_in_schedulingClause1011 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_set_in_schedulingClause1016 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC04000000402202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_objectExpression_in_schedulingClause1022 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_simpleTimingClause_in_timingClause1033 = new BitSet(new ulong[]{0x0000000000000002UL,0x0000000000040000UL});
    public static readonly BitSet FOLLOW_PRIOR_in_timingClause1036 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_set_in_simpleTimingClause1050 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC04000000402202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_arithmeticExpression_in_simpleTimingClause1056 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_block_in_programBody1072 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_label_in_statement1095 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000001UL});
    public static readonly BitSet FOLLOW_COLON_in_statement1097 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC0400096540E202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_unconditionalStatement_in_statement1105 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_conditionalStatement_in_statement1109 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_forStatement_in_statement1113 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_prefixedBlock_in_unconditionalStatement1158 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_objectGenerator_in_unconditionalStatement1175 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_assignmentStatement_in_unconditionalStatement1186 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_procedureStatement_in_unconditionalStatement1191 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_whileStatement_in_unconditionalStatement1204 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_gotoStatement_in_unconditionalStatement1248 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_connectionStatement_in_unconditionalStatement1293 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_block_in_unconditionalStatement1332 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_activationStatement_in_unconditionalStatement1344 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_dummyStatement_in_unconditionalStatement1358 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_postfixExpression_in_procedureStatement1386 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_destination_in_assignmentStatement1414 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000060UL});
    public static readonly BitSet FOLLOW_assignmentOp_in_assignmentStatement1416 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC04000000402202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_assignmentStatement_in_assignmentStatement1430 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_expression_in_assignmentStatement1450 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_postfixExpression_in_destination1483 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_set_in_assignmentOp0 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_ifClause_in_conditionalStatement1517 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC0400096540E202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_unconditionalStatement_in_conditionalStatement1521 = new BitSet(new ulong[]{0x0000000000000002UL,0x0000000000200000UL});
    public static readonly BitSet FOLLOW_forStatement_in_conditionalStatement1523 = new BitSet(new ulong[]{0x0000000000000002UL,0x0000000000200000UL});
    public static readonly BitSet FOLLOW_ELSE_in_conditionalStatement1534 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC0400096540E202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_statement_in_conditionalStatement1537 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_IF_in_ifClause1551 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC04000000402202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_booleanExpression_in_ifClause1554 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000800000UL});
    public static readonly BitSet FOLLOW_THEN_in_ifClause1556 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_WHILE_in_whileStatement1568 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC04000000402202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_booleanExpression_in_whileStatement1571 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000002000000UL});
    public static readonly BitSet FOLLOW_DO_in_whileStatement1573 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC0400096540E202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_statement_in_whileStatement1576 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_FOR_in_forStatement1587 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000200UL});
    public static readonly BitSet FOLLOW_simpleVariable_in_forStatement1590 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000060UL});
    public static readonly BitSet FOLLOW_forRightPart_in_forStatement1592 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000002000000UL});
    public static readonly BitSet FOLLOW_DO_in_forStatement1594 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC0400096540E202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_statement_in_forStatement1597 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_ID_in_simpleVariable1611 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_VALASSIGN_in_forRightPart1622 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC04000000402202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_valueForListElement_in_forRightPart1625 = new BitSet(new ulong[]{0x0000000000000002UL,0x0000000000000010UL});
    public static readonly BitSet FOLLOW_COMMA_in_forRightPart1629 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC04000000402202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_valueForListElement_in_forRightPart1632 = new BitSet(new ulong[]{0x0000000000000002UL,0x0000000000000010UL});
    public static readonly BitSet FOLLOW_REFASSIGN_in_forRightPart1641 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC04000000402202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_referenceForListElement_in_forRightPart1644 = new BitSet(new ulong[]{0x0000000000000002UL,0x0000000000000010UL});
    public static readonly BitSet FOLLOW_COMMA_in_forRightPart1648 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC04000000402202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_referenceForListElement_in_forRightPart1651 = new BitSet(new ulong[]{0x0000000000000002UL,0x0000000000000010UL});
    public static readonly BitSet FOLLOW_expression_in_valueForListElement1666 = new BitSet(new ulong[]{0x0000000000000002UL,0x0000000009000000UL});
    public static readonly BitSet FOLLOW_WHILE_in_valueForListElement1678 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC04000000402202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_booleanExpression_in_valueForListElement1682 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_STEP_in_valueForListElement1716 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC04000000402202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_arithmeticExpression_in_valueForListElement1720 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000010000000UL});
    public static readonly BitSet FOLLOW_UNTIL_in_valueForListElement1722 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC04000000402202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_arithmeticExpression_in_valueForListElement1726 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_expression_in_referenceForListElement1771 = new BitSet(new ulong[]{0x0000000000000002UL,0x0000000001000000UL});
    public static readonly BitSet FOLLOW_WHILE_in_referenceForListElement1774 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC04000000402202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_booleanExpression_in_referenceForListElement1778 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_GOTO_in_gotoStatement1810 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000200UL});
    public static readonly BitSet FOLLOW_GO_in_gotoStatement1814 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000080000000UL});
    public static readonly BitSet FOLLOW_TO_in_gotoStatement1816 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000200UL});
    public static readonly BitSet FOLLOW_designationalExpression_in_gotoStatement1820 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_INSPECT_in_connectionStatement1841 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC04000000402202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_objectExpression_in_connectionStatement1844 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000202000000UL});
    public static readonly BitSet FOLLOW_whenClause_in_connectionStatement1850 = new BitSet(new ulong[]{0x0000000000000002UL,0x0000000600000000UL});
    public static readonly BitSet FOLLOW_whenClause_in_connectionStatement1860 = new BitSet(new ulong[]{0x0000000000000002UL,0x0000000600000000UL});
    public static readonly BitSet FOLLOW_otherwiseClause_in_connectionStatement1873 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_DO_in_connectionStatement1888 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC0400096540E202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_connectionBlock2_in_connectionStatement1891 = new BitSet(new ulong[]{0x0000000000000002UL,0x0000000400000000UL});
    public static readonly BitSet FOLLOW_otherwiseClause_in_connectionStatement1901 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_WHEN_in_whenClause1920 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000200UL});
    public static readonly BitSet FOLLOW_classIdentifier_in_whenClause1923 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000002000000UL});
    public static readonly BitSet FOLLOW_DO_in_whenClause1925 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC0400096540E202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_connectionBlock1_in_whenClause1928 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_OTHERWISE_in_otherwiseClause1940 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC0400096540E202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_statement_in_otherwiseClause1943 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_statement_in_connectionBlock11954 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_statement_in_connectionBlock21974 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_BEGIN_in_compoundStatement1994 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC0400096540E202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_compoundTail_in_compoundStatement1996 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_statement_in_compoundTail2015 = new BitSet(new ulong[]{0x8000000000000000UL,0x0000001000000000UL});
    public static readonly BitSet FOLLOW_SCOLON_in_compoundTail2019 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC0400096540E202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_statement_in_compoundTail2022 = new BitSet(new ulong[]{0x8000000000000000UL,0x0000001000000000UL});
    public static readonly BitSet FOLLOW_END_in_compoundTail2027 = new BitSet(new ulong[]{0x7FFFFFFFFFFFFFF2UL,0xFFFFFFE9FFDFFFFFUL,0x0000FFFFFFFFFFFFUL});
    public static readonly BitSet FOLLOW_set_in_compoundTail2031 = new BitSet(new ulong[]{0x7FFFFFFFFFFFFFF2UL,0xFFFFFFE9FFDFFFFFUL,0x0000FFFFFFFFFFFFUL});
    public static readonly BitSet FOLLOW_subBlock_in_block2064 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_compoundStatement_in_block2078 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_blockHead_in_subBlock2090 = new BitSet(new ulong[]{0x8000000000000000UL});
    public static readonly BitSet FOLLOW_SCOLON_in_subBlock2092 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC0400096540E202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_compoundTail_in_subBlock2095 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_BEGIN_in_blockHead2107 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000006800000B80UL,0x00000000000001FEUL});
    public static readonly BitSet FOLLOW_declaration_in_blockHead2110 = new BitSet(new ulong[]{0x8000000000000002UL});
    public static readonly BitSet FOLLOW_SCOLON_in_blockHead2122 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000006800000B80UL,0x00000000000001FEUL});
    public static readonly BitSet FOLLOW_declaration_in_blockHead2125 = new BitSet(new ulong[]{0x8000000000000002UL});
    public static readonly BitSet FOLLOW_ID_in_prefixedBlock2147 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000800000002UL});
    public static readonly BitSet FOLLOW_actualParameterPart_in_prefixedBlock2151 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000800000000UL});
    public static readonly BitSet FOLLOW_block_in_prefixedBlock2161 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_simpleVarDeclaration_in_declaration2243 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_arrayDeclaration_in_declaration2250 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_switchDeclaration_in_declaration2256 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_procedureDeclaration_in_declaration2262 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_classDeclaration_in_declaration2268 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_externalDeclaration_in_declaration2274 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_type_in_simpleVarDeclaration2286 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000200UL});
    public static readonly BitSet FOLLOW_typeList_in_simpleVarDeclaration2288 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_typeListElement_in_typeList2309 = new BitSet(new ulong[]{0x0000000000000002UL,0x0000000000000010UL});
    public static readonly BitSet FOLLOW_COMMA_in_typeList2313 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000200UL});
    public static readonly BitSet FOLLOW_typeListElement_in_typeList2315 = new BitSet(new ulong[]{0x0000000000000002UL,0x0000000000000010UL});
    public static readonly BitSet FOLLOW_constantElement_in_typeListElement2346 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_ID_in_typeListElement2352 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_type_in_arrayDeclaration2365 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000002000000000UL});
    public static readonly BitSet FOLLOW_ARRAY_in_arrayDeclaration2370 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000200UL});
    public static readonly BitSet FOLLOW_arraySegment_in_arrayDeclaration2372 = new BitSet(new ulong[]{0x0000000000000002UL,0x0000000000000010UL});
    public static readonly BitSet FOLLOW_COMMA_in_arrayDeclaration2376 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000200UL});
    public static readonly BitSet FOLLOW_arraySegment_in_arrayDeclaration2378 = new BitSet(new ulong[]{0x0000000000000002UL,0x0000000000000010UL});
    public static readonly BitSet FOLLOW_arrayIdentifier_in_arraySegment2410 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000012UL});
    public static readonly BitSet FOLLOW_COMMA_in_arraySegment2414 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000200UL});
    public static readonly BitSet FOLLOW_arrayIdentifier_in_arraySegment2416 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000012UL});
    public static readonly BitSet FOLLOW_LPAR_in_arraySegment2421 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC04000000402202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_boundPairList_in_arraySegment2423 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000004UL});
    public static readonly BitSet FOLLOW_RPAR_in_arraySegment2425 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_ID_in_arrayIdentifier2451 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_boundPair_in_boundPairList2462 = new BitSet(new ulong[]{0x0000000000000002UL,0x0000000000000010UL});
    public static readonly BitSet FOLLOW_COMMA_in_boundPairList2466 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC04000000402202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_boundPair_in_boundPairList2469 = new BitSet(new ulong[]{0x0000000000000002UL,0x0000000000000010UL});
    public static readonly BitSet FOLLOW_arithmeticExpression_in_boundPair2485 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000001UL});
    public static readonly BitSet FOLLOW_COLON_in_boundPair2487 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC04000000402202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_arithmeticExpression_in_boundPair2489 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_SWITCH_in_switchDeclaration2510 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000200UL});
    public static readonly BitSet FOLLOW_switchIdentifier_in_switchDeclaration2513 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000020UL});
    public static readonly BitSet FOLLOW_VALASSIGN_in_switchDeclaration2515 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000200UL});
    public static readonly BitSet FOLLOW_switchList_in_switchDeclaration2518 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_ID_in_switchList2529 = new BitSet(new ulong[]{0x0000000000000002UL,0x0000000000000010UL});
    public static readonly BitSet FOLLOW_COMMA_in_switchList2533 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000200UL});
    public static readonly BitSet FOLLOW_ID_in_switchList2535 = new BitSet(new ulong[]{0x0000000000000002UL,0x0000000000000010UL});
    public static readonly BitSet FOLLOW_type_in_procedureDeclaration2559 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000100UL});
    public static readonly BitSet FOLLOW_PROCEDURE_in_procedureDeclaration2563 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000200UL});
    public static readonly BitSet FOLLOW_procedureHeading_in_procedureDeclaration2565 = new BitSet(new ulong[]{0x8000000000000000UL});
    public static readonly BitSet FOLLOW_SCOLON_in_procedureDeclaration2567 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC0400096540E202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_procedureBody_in_procedureDeclaration2569 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_procedureIdentifier_in_procedureHeading2595 = new BitSet(new ulong[]{0x0000000000000002UL,0x0000000000000002UL});
    public static readonly BitSet FOLLOW_formalParameterPart_in_procedureHeading2602 = new BitSet(new ulong[]{0x8000000000000000UL});
    public static readonly BitSet FOLLOW_SCOLON_in_procedureHeading2604 = new BitSet(new ulong[]{0x0000000000000000UL,0x000003C000000000UL,0x00000000000001FEUL});
    public static readonly BitSet FOLLOW_modePart_in_procedureHeading2608 = new BitSet(new ulong[]{0x0000000000000000UL,0x000003C000000000UL,0x00000000000001FEUL});
    public static readonly BitSet FOLLOW_specificationPart_in_procedureHeading2612 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_statement_in_procedureBody2626 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_ID_in_procedureIdentifier2646 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_LPAR_in_formalParameterPart2657 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000200UL});
    public static readonly BitSet FOLLOW_formalParameter_in_formalParameterPart2659 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000014UL});
    public static readonly BitSet FOLLOW_COMMA_in_formalParameterPart2663 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000200UL});
    public static readonly BitSet FOLLOW_formalParameter_in_formalParameterPart2665 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000014UL});
    public static readonly BitSet FOLLOW_RPAR_in_formalParameterPart2670 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_ID_in_formalParameter2690 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_specifier_in_specificationPart2701 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000200UL});
    public static readonly BitSet FOLLOW_identifierList_in_specificationPart2703 = new BitSet(new ulong[]{0x8000000000000002UL});
    public static readonly BitSet FOLLOW_SCOLON_in_specificationPart2715 = new BitSet(new ulong[]{0x0000000000000000UL,0x000003C000000000UL,0x00000000000001FEUL});
    public static readonly BitSet FOLLOW_specifier_in_specificationPart2717 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000200UL});
    public static readonly BitSet FOLLOW_identifierList_in_specificationPart2719 = new BitSet(new ulong[]{0x8000000000000002UL});
    public static readonly BitSet FOLLOW_type_in_specifier2749 = new BitSet(new ulong[]{0x0000000000000002UL,0x0000002000000100UL});
    public static readonly BitSet FOLLOW_set_in_specifier2751 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_LABEL_in_specifier2772 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_SWITCH_in_specifier2784 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_namePart_in_modePart2795 = new BitSet(new ulong[]{0x0000000000000002UL,0x0000030000000000UL});
    public static readonly BitSet FOLLOW_valuePart_in_modePart2799 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_valuePart_in_modePart2814 = new BitSet(new ulong[]{0x0000000000000002UL,0x0000010000000000UL});
    public static readonly BitSet FOLLOW_namePart_in_modePart2818 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_NAME_in_namePart2832 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000200UL});
    public static readonly BitSet FOLLOW_identifierList_in_namePart2835 = new BitSet(new ulong[]{0x8000000000000000UL});
    public static readonly BitSet FOLLOW_SCOLON_in_namePart2837 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_VALUE_in_valuePart2849 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000200UL});
    public static readonly BitSet FOLLOW_identifierList_in_valuePart2852 = new BitSet(new ulong[]{0x8000000000000000UL});
    public static readonly BitSet FOLLOW_SCOLON_in_valuePart2854 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_ID_in_identifierList2867 = new BitSet(new ulong[]{0x0000000000000002UL,0x0000000000000010UL});
    public static readonly BitSet FOLLOW_COMMA_in_identifierList2870 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000200UL});
    public static readonly BitSet FOLLOW_ID_in_identifierList2873 = new BitSet(new ulong[]{0x0000000000000002UL,0x0000000000000010UL});
    public static readonly BitSet FOLLOW_prefix_in_classDeclaration2889 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000800000B00UL,0x00000000000001FEUL});
    public static readonly BitSet FOLLOW_mainPart_in_classDeclaration2894 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_classIdentifier_in_prefix2915 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_CLASS_in_mainPart2926 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000200UL});
    public static readonly BitSet FOLLOW_ID_in_mainPart2930 = new BitSet(new ulong[]{0x8000000000000000UL,0x0000000000000002UL});
    public static readonly BitSet FOLLOW_formalParameterPart_in_mainPart2942 = new BitSet(new ulong[]{0x8000000000000000UL});
    public static readonly BitSet FOLLOW_SCOLON_in_mainPart2944 = new BitSet(new ulong[]{0x0000000000000000UL,0x000003C000000000UL,0x00000000000001FEUL});
    public static readonly BitSet FOLLOW_valuePart_in_mainPart2960 = new BitSet(new ulong[]{0x0000000000000000UL,0x000003C000000000UL,0x00000000000001FEUL});
    public static readonly BitSet FOLLOW_specificationPart_in_mainPart2966 = new BitSet(new ulong[]{0x8000000000000000UL});
    public static readonly BitSet FOLLOW_SCOLON_in_mainPart2971 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000380800000000UL});
    public static readonly BitSet FOLLOW_protectionPart_in_mainPart2987 = new BitSet(new ulong[]{0x8000000000000000UL});
    public static readonly BitSet FOLLOW_SCOLON_in_mainPart2989 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000380800000000UL});
    public static readonly BitSet FOLLOW_virtualPart_in_mainPart3007 = new BitSet(new ulong[]{0x8000000000000000UL});
    public static readonly BitSet FOLLOW_SCOLON_in_mainPart3009 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000380800000000UL});
    public static readonly BitSet FOLLOW_classBody_in_mainPart3024 = new BitSet(new ulong[]{0x7FFFFFFFFFFFFFF2UL,0xFFFFFFE9FFDFFFFFUL,0x0000FFFFFFFFFFFFUL});
    public static readonly BitSet FOLLOW_set_in_mainPart3027 = new BitSet(new ulong[]{0x7FFFFFFFFFFFFFF2UL,0xFFFFFFE9FFDFFFFFUL,0x0000FFFFFFFFFFFFUL});
    public static readonly BitSet FOLLOW_ID_in_classIdentifier3063 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_BEGIN_in_classBody3075 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC0400696540EB82UL,0x00000000000007FFUL});
    public static readonly BitSet FOLLOW_initialOperations_in_classBody3077 = new BitSet(new ulong[]{0x8000000000000000UL,0x0000001000000000UL});
    public static readonly BitSet FOLLOW_SCOLON_in_classBody3080 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000040000000000UL});
    public static readonly BitSet FOLLOW_finalOperations_in_classBody3082 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000001000000000UL});
    public static readonly BitSet FOLLOW_END_in_classBody3086 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_statement_in_initialOperations3120 = new BitSet(new ulong[]{0x8000000000000002UL});
    public static readonly BitSet FOLLOW_SCOLON_in_initialOperations3131 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC0400096540E202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_statement_in_initialOperations3133 = new BitSet(new ulong[]{0x8000000000000002UL});
    public static readonly BitSet FOLLOW_declaration_in_initialOperations3149 = new BitSet(new ulong[]{0x8000000000000002UL});
    public static readonly BitSet FOLLOW_SCOLON_in_initialOperations3160 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000006800000B80UL,0x00000000000001FEUL});
    public static readonly BitSet FOLLOW_declaration_in_initialOperations3162 = new BitSet(new ulong[]{0x8000000000000002UL});
    public static readonly BitSet FOLLOW_SCOLON_in_initialOperations3175 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC0400096540E202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_statement_in_initialOperations3177 = new BitSet(new ulong[]{0x8000000000000002UL});
    public static readonly BitSet FOLLOW_INNER_in_finalOperations3206 = new BitSet(new ulong[]{0x8000000000000000UL});
    public static readonly BitSet FOLLOW_SCOLON_in_finalOperations3208 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC0400096540E202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_statement_in_finalOperations3210 = new BitSet(new ulong[]{0x8000000000000002UL});
    public static readonly BitSet FOLLOW_SCOLON_in_finalOperations3213 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC0400096540E202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_statement_in_finalOperations3215 = new BitSet(new ulong[]{0x8000000000000002UL});
    public static readonly BitSet FOLLOW_VIRTUAL_in_virtualPart3237 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000001UL});
    public static readonly BitSet FOLLOW_COLON_in_virtualPart3239 = new BitSet(new ulong[]{0x0000000000000000UL,0x000003C000000100UL,0x00000000000001FEUL});
    public static readonly BitSet FOLLOW_virtualSpec_in_virtualPart3241 = new BitSet(new ulong[]{0x8000000000000000UL});
    public static readonly BitSet FOLLOW_SCOLON_in_virtualPart3243 = new BitSet(new ulong[]{0x0000000000000002UL,0x000003C000000100UL,0x00000000000001FEUL});
    public static readonly BitSet FOLLOW_virtualSpec_in_virtualPart3247 = new BitSet(new ulong[]{0x8000000000000000UL});
    public static readonly BitSet FOLLOW_SCOLON_in_virtualPart3249 = new BitSet(new ulong[]{0x0000000000000002UL,0x000003C000000100UL,0x00000000000001FEUL});
    public static readonly BitSet FOLLOW_specifier_in_virtualSpec3263 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000200UL});
    public static readonly BitSet FOLLOW_identifierList_in_virtualSpec3265 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_PROCEDURE_in_virtualSpec3270 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000200UL});
    public static readonly BitSet FOLLOW_procedureIdentifier_in_virtualSpec3272 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000400UL});
    public static readonly BitSet FOLLOW_procedureSpecification_in_virtualSpec3274 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_protectionSpecification_in_protectionPart3285 = new BitSet(new ulong[]{0x8000000000000002UL});
    public static readonly BitSet FOLLOW_SCOLON_in_protectionPart3301 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000300000000000UL});
    public static readonly BitSet FOLLOW_protectionSpecification_in_protectionPart3303 = new BitSet(new ulong[]{0x8000000000000002UL});
    public static readonly BitSet FOLLOW_HIDDEN_in_protectionSpecification3327 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000200UL});
    public static readonly BitSet FOLLOW_identifierList_in_protectionSpecification3329 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_PROTECTED_in_protectionSpecification3342 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000200UL});
    public static readonly BitSet FOLLOW_identifierList_in_protectionSpecification3344 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_HIDDEN_in_protectionSpecification3359 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000200000000000UL});
    public static readonly BitSet FOLLOW_PROTECTED_in_protectionSpecification3361 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000200UL});
    public static readonly BitSet FOLLOW_identifierList_in_protectionSpecification3363 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_PROTECTED_in_protectionSpecification3377 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000100000000000UL});
    public static readonly BitSet FOLLOW_HIDDEN_in_protectionSpecification3379 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000200UL});
    public static readonly BitSet FOLLOW_identifierList_in_protectionSpecification3381 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_ID_in_constantElement3394 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000001000UL});
    public static readonly BitSet FOLLOW_EQ_in_constantElement3396 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC04000000402202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_expression_in_constantElement3398 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_simpleExpression_in_expression3425 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_ifClause_in_expression3430 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC04000000002202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_simpleExpression_in_expression3432 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000200000UL});
    public static readonly BitSet FOLLOW_ELSE_in_expression3434 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC04000000402202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_expression_in_expression3436 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_ID_in_designationalExpression3455 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000002UL});
    public static readonly BitSet FOLLOW_LPAR_in_designationalExpression3457 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC04000000402202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_subscriptExpression_in_designationalExpression3459 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000004UL});
    public static readonly BitSet FOLLOW_RPAR_in_designationalExpression3461 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_ID_in_designationalExpression3476 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_expression_in_booleanExpression3495 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_expression_in_arithmeticExpression3507 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_expression_in_objectExpression3519 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_expression_in_textExpression3531 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_simpleExpression_in_simpleTextExpression3544 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_conditionalExpression_in_simpleExpression3556 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_arithmeticExpression_in_subscriptExpression3567 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_booleanTertiary_in_conditionalExpression3588 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000400000000000UL});
    public static readonly BitSet FOLLOW_OR_in_conditionalExpression3593 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000200000UL});
    public static readonly BitSet FOLLOW_ELSE_in_conditionalExpression3595 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC04000000002202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_conditionalExpression_in_conditionalExpression3598 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_booleanTertiary_in_conditionalExpression3615 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_equivalence_in_booleanTertiary3637 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000800000000000UL});
    public static readonly BitSet FOLLOW_AND_in_booleanTertiary3643 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000800000UL});
    public static readonly BitSet FOLLOW_THEN_in_booleanTertiary3645 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC04000000002202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_booleanTertiary_in_booleanTertiary3648 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_equivalence_in_booleanTertiary3664 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_implication_in_equivalence3676 = new BitSet(new ulong[]{0x0000000000000002UL,0x0001000000000000UL});
    public static readonly BitSet FOLLOW_EQV_in_equivalence3680 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC04000000002202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_implication_in_equivalence3683 = new BitSet(new ulong[]{0x0000000000000002UL,0x0001000000000000UL});
    public static readonly BitSet FOLLOW_booleanTerm_in_implication3697 = new BitSet(new ulong[]{0x0000000000000002UL,0x0002000000000000UL});
    public static readonly BitSet FOLLOW_IMP_in_implication3701 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC04000000002202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_booleanTerm_in_implication3704 = new BitSet(new ulong[]{0x0000000000000002UL,0x0002000000000000UL});
    public static readonly BitSet FOLLOW_booleanFactor_in_booleanTerm3718 = new BitSet(new ulong[]{0x0000000000000002UL,0x0000400000000000UL});
    public static readonly BitSet FOLLOW_OR_in_booleanTerm3731 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC04000000002202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_booleanFactor_in_booleanTerm3734 = new BitSet(new ulong[]{0x0000000000000002UL,0x0000400000000000UL});
    public static readonly BitSet FOLLOW_booleanSecondary_in_booleanFactor3749 = new BitSet(new ulong[]{0x0000000000000002UL,0x0000800000000000UL});
    public static readonly BitSet FOLLOW_AND_in_booleanFactor3763 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC04000000002202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_booleanSecondary_in_booleanFactor3766 = new BitSet(new ulong[]{0x0000000000000002UL,0x0000800000000000UL});
    public static readonly BitSet FOLLOW_NOT_in_booleanSecondary3782 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC04000000002202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_referenceExpression_in_booleanSecondary3787 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_instanceExpression_in_referenceExpression3799 = new BitSet(new ulong[]{0x6000000000000002UL});
    public static readonly BitSet FOLLOW_referenceComparator_in_referenceExpression3803 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC04000000002202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_instanceExpression_in_referenceExpression3806 = new BitSet(new ulong[]{0x6000000000000002UL});
    public static readonly BitSet FOLLOW_set_in_referenceComparator0 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_relationExpression_in_instanceExpression3837 = new BitSet(new ulong[]{0x0000000000000002UL,0x0008000000000400UL});
    public static readonly BitSet FOLLOW_set_in_instanceExpression3840 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000200UL});
    public static readonly BitSet FOLLOW_classIdentifier_in_instanceExpression3847 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_additiveExpression_in_relationExpression3862 = new BitSet(new ulong[]{0x0000000000000002UL,0x01F0000000001000UL});
    public static readonly BitSet FOLLOW_valueRelationalOperator_in_relationExpression3866 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC04000000002202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_additiveExpression_in_relationExpression3869 = new BitSet(new ulong[]{0x0000000000000002UL,0x01F0000000001000UL});
    public static readonly BitSet FOLLOW_set_in_valueRelationalOperator0 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_term_in_additiveExpression3915 = new BitSet(new ulong[]{0x0060000000000002UL});
    public static readonly BitSet FOLLOW_set_in_additiveExpression3919 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC04000000002202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_term_in_additiveExpression3926 = new BitSet(new ulong[]{0x0060000000000002UL});
    public static readonly BitSet FOLLOW_factor_in_term3939 = new BitSet(new ulong[]{0x0380000000000002UL});
    public static readonly BitSet FOLLOW_set_in_term3943 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC04000000002202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_factor_in_term3958 = new BitSet(new ulong[]{0x0380000000000002UL});
    public static readonly BitSet FOLLOW_unaryExpression_in_factor3970 = new BitSet(new ulong[]{0x0400000000000002UL});
    public static readonly BitSet FOLLOW_EXP_in_factor3974 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC04000000002202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_unaryExpression_in_factor3977 = new BitSet(new ulong[]{0x0400000000000002UL});
    public static readonly BitSet FOLLOW_PLUS_in_unaryExpression3991 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC04000000002202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_unaryExpression_in_unaryExpression3993 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_MINUS_in_unaryExpression4009 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC04000000002202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_unaryExpression_in_unaryExpression4011 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_postfixExpression_in_unaryExpression4026 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_qualifierExpression_in_postfixExpression4040 = new BitSet(new ulong[]{0x0000000000000002UL,0x0000000000000008UL});
    public static readonly BitSet FOLLOW_DOT_in_postfixExpression4062 = new BitSet(new ulong[]{0x0000000000000000UL,0xFC00000000002202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_qualifierExpression_in_postfixExpression4066 = new BitSet(new ulong[]{0x0000000000000002UL,0x0000000000000008UL});
    public static readonly BitSet FOLLOW_qualifierExpression_in_postfixExpression4102 = new BitSet(new ulong[]{0x0000000000000002UL,0x0000000000000008UL});
    public static readonly BitSet FOLLOW_DOT_in_postfixExpression4124 = new BitSet(new ulong[]{0x0000000000000000UL,0xFC00000000002202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_qualifierExpression_in_postfixExpression4128 = new BitSet(new ulong[]{0x0000000000000002UL,0x0000000000000008UL});
    public static readonly BitSet FOLLOW_textConcat_in_qualifierExpression4176 = new BitSet(new ulong[]{0x0000000000000002UL,0x0200000000000000UL});
    public static readonly BitSet FOLLOW_QUA_in_qualifierExpression4179 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000200UL});
    public static readonly BitSet FOLLOW_classIdentifier_in_qualifierExpression4182 = new BitSet(new ulong[]{0x0000000000000002UL,0x0200000000000000UL});
    public static readonly BitSet FOLLOW_primary_in_textConcat4195 = new BitSet(new ulong[]{0x0800000000000002UL});
    public static readonly BitSet FOLLOW_CONCAT_in_textConcat4199 = new BitSet(new ulong[]{0x0000000000000000UL,0xFC00000000002202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_primary_in_textConcat4202 = new BitSet(new ulong[]{0x0800000000000002UL});
    public static readonly BitSet FOLLOW_NONE_in_primary4215 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_litteral_in_primary4220 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_objectGenerator_in_primary4225 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_localObject_in_primary4230 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_logicalValue_in_primary4236 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_primaryIdentifier_in_primary4241 = new BitSet(new ulong[]{0x0000000000000002UL,0x0000000000000002UL});
    public static readonly BitSet FOLLOW_actualParameterPart_in_primary4244 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_LPAR_in_primary4252 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC04000000402202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_expression_in_primary4254 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000004UL});
    public static readonly BitSet FOLLOW_RPAR_in_primary4256 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_set_in_litteral0 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_ID_in_primaryIdentifier4302 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_switchIdentifier_in_switchDesignator4313 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000002UL});
    public static readonly BitSet FOLLOW_LPAR_in_switchDesignator4315 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC04000000402202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_subscriptExpression_in_switchDesignator4317 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000004UL});
    public static readonly BitSet FOLLOW_RPAR_in_switchDesignator4319 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_subscriptExpression_in_subscriptList4330 = new BitSet(new ulong[]{0x0000000000000002UL,0x0000000000000010UL});
    public static readonly BitSet FOLLOW_COMMA_in_subscriptList4334 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC04000000402202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_subscriptExpression_in_subscriptList4336 = new BitSet(new ulong[]{0x0000000000000002UL,0x0000000000000010UL});
    public static readonly BitSet FOLLOW_LPAR_in_actualParameterPart4352 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC04000000402202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_actualParameter_in_actualParameterPart4354 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000014UL});
    public static readonly BitSet FOLLOW_COMMA_in_actualParameterPart4358 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC04000000402202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_actualParameter_in_actualParameterPart4360 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000014UL});
    public static readonly BitSet FOLLOW_RPAR_in_actualParameterPart4365 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_expression_in_actualParameter4386 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_NEW_in_objectGenerator4399 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000200UL});
    public static readonly BitSet FOLLOW_classIdentifier_in_objectGenerator4402 = new BitSet(new ulong[]{0x0000000000000002UL,0x0000000000000002UL});
    public static readonly BitSet FOLLOW_actualParameterPart_in_objectGenerator4412 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_THIS_in_localObject4427 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000200UL});
    public static readonly BitSet FOLLOW_classIdentifier_in_localObject4430 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_ID_in_switchIdentifier4445 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_ID_in_label4455 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_valType_in_type4469 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_refType_in_type4483 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_aritmeticType_in_valType4501 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_BOOLEAN_in_valType4506 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_CHARACTER_in_valType4511 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_integerType_in_aritmeticType4522 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_realType_in_aritmeticType4527 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_INTEGER_in_integerType4539 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_SHORT_in_integerType4553 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000000UL,0x0000000000000008UL});
    public static readonly BitSet FOLLOW_INTEGER_in_integerType4555 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_REAL_in_realType4569 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_LONG_in_realType4574 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000000UL,0x0000000000000020UL});
    public static readonly BitSet FOLLOW_REAL_in_realType4576 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_objectRefType_in_refType4590 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_TEXT_in_refType4595 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_REF_in_objectRefType4606 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000002UL});
    public static readonly BitSet FOLLOW_LPAR_in_objectRefType4608 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000200UL});
    public static readonly BitSet FOLLOW_qualification_in_objectRefType4611 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000004UL});
    public static readonly BitSet FOLLOW_RPAR_in_objectRefType4613 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_classIdentifier_in_qualification4627 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_set_in_logicalValue0 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_ID_in_synpred1_SimSharp678 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000800UL});
    public static readonly BitSet FOLLOW_CLASS_in_synpred1_SimSharp682 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_EXTERNAL_in_synpred2_SimSharp753 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000800UL});
    public static readonly BitSet FOLLOW_CLASS_in_synpred2_SimSharp755 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_label_in_synpred3_SimSharp1088 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000001UL});
    public static readonly BitSet FOLLOW_COLON_in_synpred3_SimSharp1090 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_prefixedBlock_in_synpred4_SimSharp1153 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_objectGenerator_in_synpred5_SimSharp1164 = new BitSet(new ulong[]{0x8000000000000000UL,0x0000001000000000UL});
    public static readonly BitSet FOLLOW_set_in_synpred5_SimSharp1166 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_assignmentStatement_in_synpred6_SimSharp1181 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_assignmentStatement_in_synpred8_SimSharp1425 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_ELSE_in_synpred9_SimSharp1529 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_whenClause_in_synpred10_SimSharp1855 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_otherwiseClause_in_synpred11_SimSharp1868 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_otherwiseClause_in_synpred12_SimSharp1896 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_BEGIN_in_synpred13_SimSharp2056 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000006800000B80UL,0x00000000000001FEUL});
    public static readonly BitSet FOLLOW_declaration_in_synpred13_SimSharp2058 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_SCOLON_in_synpred14_SimSharp2115 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000006800000B80UL,0x00000000000001FEUL});
    public static readonly BitSet FOLLOW_declaration_in_synpred14_SimSharp2117 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_ID_in_synpred15_SimSharp2339 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000001000UL});
    public static readonly BitSet FOLLOW_EQ_in_synpred15_SimSharp2341 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_SCOLON_in_synpred16_SimSharp2708 = new BitSet(new ulong[]{0x0000000000000000UL,0x000003C000000000UL,0x00000000000001FEUL});
    public static readonly BitSet FOLLOW_specifier_in_synpred16_SimSharp2710 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_statement_in_synpred17_SimSharp3115 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_SCOLON_in_synpred18_SimSharp3124 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC0400096540E202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_statement_in_synpred18_SimSharp3126 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_SCOLON_in_synpred19_SimSharp3153 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000006800000B80UL,0x00000000000001FEUL});
    public static readonly BitSet FOLLOW_declaration_in_synpred19_SimSharp3155 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_SCOLON_in_synpred20_SimSharp3168 = new BitSet(new ulong[]{0x0060000000000000UL,0xFC0400096540E202UL,0x0000000000000601UL});
    public static readonly BitSet FOLLOW_statement_in_synpred20_SimSharp3170 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_SCOLON_in_synpred21_SimSharp3290 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000300000000000UL});
    public static readonly BitSet FOLLOW_set_in_synpred21_SimSharp3292 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_ID_in_synpred22_SimSharp3448 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000002UL});
    public static readonly BitSet FOLLOW_LPAR_in_synpred22_SimSharp3450 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_booleanTertiary_in_synpred23_SimSharp3579 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000400000000000UL});
    public static readonly BitSet FOLLOW_OR_in_synpred23_SimSharp3581 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000200000UL});
    public static readonly BitSet FOLLOW_ELSE_in_synpred23_SimSharp3583 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_equivalence_in_synpred24_SimSharp3628 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000800000000000UL});
    public static readonly BitSet FOLLOW_AND_in_synpred24_SimSharp3630 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000800000UL});
    public static readonly BitSet FOLLOW_THEN_in_synpred24_SimSharp3632 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_OR_in_synpred25_SimSharp3723 = new BitSet(new ulong[]{0xFFFFFFFFFFFFFFF0UL,0xFFFFFFFFFFDFFFFFUL,0x0000FFFFFFFFFFFFUL});
    public static readonly BitSet FOLLOW_set_in_synpred25_SimSharp3725 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_AND_in_synpred26_SimSharp3754 = new BitSet(new ulong[]{0xFFFFFFFFFFFFFFF0UL,0xFFFFFFFFFF7FFFFFUL,0x0000FFFFFFFFFFFFUL});
    public static readonly BitSet FOLLOW_set_in_synpred26_SimSharp3756 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_LPAR_in_synpred27_SimSharp4407 = new BitSet(new ulong[]{0x0000000000000002UL});

}
